hyperdrive

package
v2.0.0-beta.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigDeleteParams

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

type ConfigDeleteResponse

type ConfigDeleteResponse interface {
	ImplementsHyperdriveConfigDeleteResponse()
}

Union satisfied by hyperdrive.ConfigDeleteResponseUnknown or shared.UnionString.

type ConfigDeleteResponseEnvelope

type ConfigDeleteResponseEnvelope struct {
	Errors   []ConfigDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ConfigDeleteResponseEnvelopeMessages `json:"messages,required"`
	Result   ConfigDeleteResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success ConfigDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    configDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*ConfigDeleteResponseEnvelope) UnmarshalJSON

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

type ConfigDeleteResponseEnvelopeErrors

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

func (*ConfigDeleteResponseEnvelopeErrors) UnmarshalJSON

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

type ConfigDeleteResponseEnvelopeMessages

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

func (*ConfigDeleteResponseEnvelopeMessages) UnmarshalJSON

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

type ConfigDeleteResponseEnvelopeSuccess

type ConfigDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ConfigDeleteResponseEnvelopeSuccessTrue ConfigDeleteResponseEnvelopeSuccess = true
)

type ConfigEditParams

type ConfigEditParams struct {
	// Identifier
	AccountID param.Field[string]                 `path:"account_id,required"`
	Origin    param.Field[ConfigEditParamsOrigin] `json:"origin"`
}

func (ConfigEditParams) MarshalJSON

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

type ConfigEditParamsOrigin

type ConfigEditParamsOrigin struct {
	// The password required to access your origin database. This value is write-only
	// and never returned by the API.
	Password param.Field[string] `json:"password,required"`
}

func (ConfigEditParamsOrigin) MarshalJSON

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

type ConfigEditResponse

type ConfigEditResponse struct {
	// Identifier
	ID   string                 `json:"id"`
	JSON configEditResponseJSON `json:"-"`
}

func (*ConfigEditResponse) UnmarshalJSON

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

type ConfigEditResponseEnvelope

type ConfigEditResponseEnvelope struct {
	Errors   []ConfigEditResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ConfigEditResponseEnvelopeMessages `json:"messages,required"`
	Result   ConfigEditResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success ConfigEditResponseEnvelopeSuccess `json:"success,required"`
	JSON    configEditResponseEnvelopeJSON    `json:"-"`
}

func (*ConfigEditResponseEnvelope) UnmarshalJSON

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

type ConfigEditResponseEnvelopeErrors

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

func (*ConfigEditResponseEnvelopeErrors) UnmarshalJSON

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

type ConfigEditResponseEnvelopeMessages

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

func (*ConfigEditResponseEnvelopeMessages) UnmarshalJSON

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

type ConfigEditResponseEnvelopeSuccess

type ConfigEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ConfigEditResponseEnvelopeSuccessTrue ConfigEditResponseEnvelopeSuccess = true
)

type ConfigGetParams

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

type ConfigGetResponse

type ConfigGetResponse struct {
	// Identifier
	ID   string                `json:"id"`
	JSON configGetResponseJSON `json:"-"`
}

func (*ConfigGetResponse) UnmarshalJSON

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

type ConfigGetResponseEnvelope

type ConfigGetResponseEnvelope struct {
	Errors   []ConfigGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ConfigGetResponseEnvelopeMessages `json:"messages,required"`
	Result   ConfigGetResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success ConfigGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    configGetResponseEnvelopeJSON    `json:"-"`
}

func (*ConfigGetResponseEnvelope) UnmarshalJSON

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

type ConfigGetResponseEnvelopeErrors

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

func (*ConfigGetResponseEnvelopeErrors) UnmarshalJSON

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

type ConfigGetResponseEnvelopeMessages

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

func (*ConfigGetResponseEnvelopeMessages) UnmarshalJSON

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

type ConfigGetResponseEnvelopeSuccess

type ConfigGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ConfigGetResponseEnvelopeSuccessTrue ConfigGetResponseEnvelopeSuccess = true
)

type ConfigListParams

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

type ConfigListResponse

type ConfigListResponse struct {
	// Identifier
	ID   string                 `json:"id"`
	JSON configListResponseJSON `json:"-"`
}

func (*ConfigListResponse) UnmarshalJSON

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

type ConfigListResponseEnvelope

type ConfigListResponseEnvelope struct {
	Errors   []ConfigListResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ConfigListResponseEnvelopeMessages `json:"messages,required"`
	Result   []ConfigListResponse                 `json:"result,required"`
	// Whether the API call was successful
	Success ConfigListResponseEnvelopeSuccess `json:"success,required"`
	JSON    configListResponseEnvelopeJSON    `json:"-"`
}

func (*ConfigListResponseEnvelope) UnmarshalJSON

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

type ConfigListResponseEnvelopeErrors

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

func (*ConfigListResponseEnvelopeErrors) UnmarshalJSON

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

type ConfigListResponseEnvelopeMessages

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

func (*ConfigListResponseEnvelopeMessages) UnmarshalJSON

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

type ConfigListResponseEnvelopeSuccess

type ConfigListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ConfigListResponseEnvelopeSuccessTrue ConfigListResponseEnvelopeSuccess = true
)

type ConfigNewParams

type ConfigNewParams struct {
	// Identifier
	AccountID param.Field[string]                `path:"account_id,required"`
	Origin    param.Field[ConfigNewParamsOrigin] `json:"origin,required"`
}

func (ConfigNewParams) MarshalJSON

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

type ConfigNewParamsOrigin

type ConfigNewParamsOrigin struct {
	// The password required to access your origin database. This value is write-only
	// and never returned by the API.
	Password param.Field[string] `json:"password,required"`
}

func (ConfigNewParamsOrigin) MarshalJSON

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

type ConfigNewResponse

type ConfigNewResponse struct {
	// Identifier
	ID   string                `json:"id"`
	JSON configNewResponseJSON `json:"-"`
}

func (*ConfigNewResponse) UnmarshalJSON

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

type ConfigNewResponseEnvelope

type ConfigNewResponseEnvelope struct {
	Errors   []ConfigNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ConfigNewResponseEnvelopeMessages `json:"messages,required"`
	Result   ConfigNewResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success ConfigNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    configNewResponseEnvelopeJSON    `json:"-"`
}

func (*ConfigNewResponseEnvelope) UnmarshalJSON

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

type ConfigNewResponseEnvelopeErrors

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

func (*ConfigNewResponseEnvelopeErrors) UnmarshalJSON

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

type ConfigNewResponseEnvelopeMessages

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

func (*ConfigNewResponseEnvelopeMessages) UnmarshalJSON

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

type ConfigNewResponseEnvelopeSuccess

type ConfigNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ConfigNewResponseEnvelopeSuccessTrue ConfigNewResponseEnvelopeSuccess = true
)

type ConfigService

type ConfigService struct {
	Options []option.RequestOption
}

ConfigService 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 NewConfigService method instead.

func NewConfigService

func NewConfigService(opts ...option.RequestOption) (r *ConfigService)

NewConfigService 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 (*ConfigService) Delete

func (r *ConfigService) Delete(ctx context.Context, hyperdriveID string, body ConfigDeleteParams, opts ...option.RequestOption) (res *ConfigDeleteResponse, err error)

Deletes the specified Hyperdrive.

func (*ConfigService) Edit

func (r *ConfigService) Edit(ctx context.Context, hyperdriveID string, params ConfigEditParams, opts ...option.RequestOption) (res *ConfigEditResponse, err error)

Patches and returns the specified Hyperdrive configuration. Updates to the origin and caching settings are applied with an all-or-nothing approach.

func (*ConfigService) Get

func (r *ConfigService) Get(ctx context.Context, hyperdriveID string, query ConfigGetParams, opts ...option.RequestOption) (res *ConfigGetResponse, err error)

Returns the specified Hyperdrive configuration.

func (*ConfigService) List

func (r *ConfigService) List(ctx context.Context, query ConfigListParams, opts ...option.RequestOption) (res *[]ConfigListResponse, err error)

Returns a list of Hyperdrives

func (*ConfigService) New

func (r *ConfigService) New(ctx context.Context, params ConfigNewParams, opts ...option.RequestOption) (res *ConfigNewResponse, err error)

Creates and returns a new Hyperdrive configuration.

func (*ConfigService) Update

func (r *ConfigService) Update(ctx context.Context, hyperdriveID string, params ConfigUpdateParams, opts ...option.RequestOption) (res *ConfigUpdateResponse, err error)

Updates and returns the specified Hyperdrive configuration.

type ConfigUpdateParams

type ConfigUpdateParams struct {
	// Identifier
	AccountID param.Field[string]                   `path:"account_id,required"`
	Origin    param.Field[ConfigUpdateParamsOrigin] `json:"origin,required"`
}

func (ConfigUpdateParams) MarshalJSON

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

type ConfigUpdateParamsOrigin

type ConfigUpdateParamsOrigin struct {
	// The password required to access your origin database. This value is write-only
	// and never returned by the API.
	Password param.Field[string] `json:"password,required"`
}

func (ConfigUpdateParamsOrigin) MarshalJSON

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

type ConfigUpdateResponse

type ConfigUpdateResponse struct {
	// Identifier
	ID   string                   `json:"id"`
	JSON configUpdateResponseJSON `json:"-"`
}

func (*ConfigUpdateResponse) UnmarshalJSON

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

type ConfigUpdateResponseEnvelope

type ConfigUpdateResponseEnvelope struct {
	Errors   []ConfigUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ConfigUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   ConfigUpdateResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success ConfigUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    configUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*ConfigUpdateResponseEnvelope) UnmarshalJSON

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

type ConfigUpdateResponseEnvelopeErrors

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

func (*ConfigUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type ConfigUpdateResponseEnvelopeMessages

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

func (*ConfigUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type ConfigUpdateResponseEnvelopeSuccess

type ConfigUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ConfigUpdateResponseEnvelopeSuccessTrue ConfigUpdateResponseEnvelopeSuccess = true
)

type Error

type Error = apierror.Error

type HyperdriveService

type HyperdriveService struct {
	Options []option.RequestOption
	Configs *ConfigService
}

HyperdriveService 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 NewHyperdriveService method instead.

func NewHyperdriveService

func NewHyperdriveService(opts ...option.RequestOption) (r *HyperdriveService)

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

Jump to

Keyboard shortcuts

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