ai_gateway

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CertificateCADigicert = shared.CertificateCADigicert

This is an alias to an internal value.

View Source
const CertificateCAGoogle = shared.CertificateCAGoogle

This is an alias to an internal value.

View Source
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt

This is an alias to an internal value.

View Source
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

View Source
const MemberStatusAccepted = shared.MemberStatusAccepted

This is an alias to an internal value.

View Source
const MemberStatusPending = shared.MemberStatusPending

This is an alias to an internal value.

View Source
const SortDirectionAsc = shared.SortDirectionAsc

This is an alias to an internal value.

View Source
const SortDirectionDesc = shared.SortDirectionDesc

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type AIGatewayDeleteParams

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

type AIGatewayDeleteResponse

type AIGatewayDeleteResponse struct {
	// gateway id
	ID                      string                                       `json:"id,required"`
	CacheInvalidateOnUpdate bool                                         `json:"cache_invalidate_on_update,required"`
	CacheTTL                int64                                        `json:"cache_ttl,required,nullable"`
	CollectLogs             bool                                         `json:"collect_logs,required"`
	CreatedAt               time.Time                                    `json:"created_at,required" format:"date-time"`
	ModifiedAt              time.Time                                    `json:"modified_at,required" format:"date-time"`
	RateLimitingInterval    int64                                        `json:"rate_limiting_interval,required,nullable"`
	RateLimitingLimit       int64                                        `json:"rate_limiting_limit,required,nullable"`
	RateLimitingTechnique   AIGatewayDeleteResponseRateLimitingTechnique `json:"rate_limiting_technique,required"`
	JSON                    aiGatewayDeleteResponseJSON                  `json:"-"`
}

func (*AIGatewayDeleteResponse) UnmarshalJSON

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

type AIGatewayDeleteResponseEnvelope

type AIGatewayDeleteResponseEnvelope struct {
	Result  AIGatewayDeleteResponse             `json:"result,required"`
	Success bool                                `json:"success,required"`
	JSON    aiGatewayDeleteResponseEnvelopeJSON `json:"-"`
}

func (*AIGatewayDeleteResponseEnvelope) UnmarshalJSON

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

type AIGatewayDeleteResponseRateLimitingTechnique added in v2.3.0

type AIGatewayDeleteResponseRateLimitingTechnique string
const (
	AIGatewayDeleteResponseRateLimitingTechniqueFixed   AIGatewayDeleteResponseRateLimitingTechnique = "fixed"
	AIGatewayDeleteResponseRateLimitingTechniqueSliding AIGatewayDeleteResponseRateLimitingTechnique = "sliding"
)

func (AIGatewayDeleteResponseRateLimitingTechnique) IsKnown added in v2.3.0

type AIGatewayGetParams

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

type AIGatewayGetResponse

type AIGatewayGetResponse struct {
	// gateway id
	ID                      string                                    `json:"id,required"`
	CacheInvalidateOnUpdate bool                                      `json:"cache_invalidate_on_update,required"`
	CacheTTL                int64                                     `json:"cache_ttl,required,nullable"`
	CollectLogs             bool                                      `json:"collect_logs,required"`
	CreatedAt               time.Time                                 `json:"created_at,required" format:"date-time"`
	ModifiedAt              time.Time                                 `json:"modified_at,required" format:"date-time"`
	RateLimitingInterval    int64                                     `json:"rate_limiting_interval,required,nullable"`
	RateLimitingLimit       int64                                     `json:"rate_limiting_limit,required,nullable"`
	RateLimitingTechnique   AIGatewayGetResponseRateLimitingTechnique `json:"rate_limiting_technique,required"`
	JSON                    aiGatewayGetResponseJSON                  `json:"-"`
}

func (*AIGatewayGetResponse) UnmarshalJSON

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

type AIGatewayGetResponseEnvelope

type AIGatewayGetResponseEnvelope struct {
	Result  AIGatewayGetResponse             `json:"result,required"`
	Success bool                             `json:"success,required"`
	JSON    aiGatewayGetResponseEnvelopeJSON `json:"-"`
}

func (*AIGatewayGetResponseEnvelope) UnmarshalJSON

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

type AIGatewayGetResponseRateLimitingTechnique added in v2.3.0

type AIGatewayGetResponseRateLimitingTechnique string
const (
	AIGatewayGetResponseRateLimitingTechniqueFixed   AIGatewayGetResponseRateLimitingTechnique = "fixed"
	AIGatewayGetResponseRateLimitingTechniqueSliding AIGatewayGetResponseRateLimitingTechnique = "sliding"
)

func (AIGatewayGetResponseRateLimitingTechnique) IsKnown added in v2.3.0

type AIGatewayListParams

type AIGatewayListParams struct {
	AccountID param.Field[string] `path:"account_id,required"`
	// gateway id
	ID param.Field[string] `query:"id"`
	// Order By Column Name
	OrderBy param.Field[string] `query:"order_by"`
	Page    param.Field[int64]  `query:"page"`
	PerPage param.Field[int64]  `query:"per_page"`
}

func (AIGatewayListParams) URLQuery

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

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

type AIGatewayListResponse

type AIGatewayListResponse struct {
	// gateway id
	ID                      string                                     `json:"id,required"`
	CacheInvalidateOnUpdate bool                                       `json:"cache_invalidate_on_update,required"`
	CacheTTL                int64                                      `json:"cache_ttl,required,nullable"`
	CollectLogs             bool                                       `json:"collect_logs,required"`
	CreatedAt               time.Time                                  `json:"created_at,required" format:"date-time"`
	ModifiedAt              time.Time                                  `json:"modified_at,required" format:"date-time"`
	RateLimitingInterval    int64                                      `json:"rate_limiting_interval,required,nullable"`
	RateLimitingLimit       int64                                      `json:"rate_limiting_limit,required,nullable"`
	RateLimitingTechnique   AIGatewayListResponseRateLimitingTechnique `json:"rate_limiting_technique,required"`
	JSON                    aiGatewayListResponseJSON                  `json:"-"`
}

func (*AIGatewayListResponse) UnmarshalJSON

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

type AIGatewayListResponseRateLimitingTechnique added in v2.3.0

type AIGatewayListResponseRateLimitingTechnique string
const (
	AIGatewayListResponseRateLimitingTechniqueFixed   AIGatewayListResponseRateLimitingTechnique = "fixed"
	AIGatewayListResponseRateLimitingTechniqueSliding AIGatewayListResponseRateLimitingTechnique = "sliding"
)

func (AIGatewayListResponseRateLimitingTechnique) IsKnown added in v2.3.0

type AIGatewayNewParams

type AIGatewayNewParams struct {
	AccountID param.Field[string] `path:"account_id,required"`
	// gateway id
	ID                      param.Field[string]                                  `json:"id,required"`
	CacheInvalidateOnUpdate param.Field[bool]                                    `json:"cache_invalidate_on_update,required"`
	CacheTTL                param.Field[int64]                                   `json:"cache_ttl,required"`
	CollectLogs             param.Field[bool]                                    `json:"collect_logs,required"`
	RateLimitingInterval    param.Field[int64]                                   `json:"rate_limiting_interval,required"`
	RateLimitingLimit       param.Field[int64]                                   `json:"rate_limiting_limit,required"`
	RateLimitingTechnique   param.Field[AIGatewayNewParamsRateLimitingTechnique] `json:"rate_limiting_technique,required"`
}

func (AIGatewayNewParams) MarshalJSON

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

type AIGatewayNewParamsRateLimitingTechnique added in v2.3.0

type AIGatewayNewParamsRateLimitingTechnique string
const (
	AIGatewayNewParamsRateLimitingTechniqueFixed   AIGatewayNewParamsRateLimitingTechnique = "fixed"
	AIGatewayNewParamsRateLimitingTechniqueSliding AIGatewayNewParamsRateLimitingTechnique = "sliding"
)

func (AIGatewayNewParamsRateLimitingTechnique) IsKnown added in v2.3.0

type AIGatewayNewResponse

type AIGatewayNewResponse struct {
	Task AIGatewayNewResponseTask `json:"task,required"`
	JSON aiGatewayNewResponseJSON `json:"-"`
}

func (*AIGatewayNewResponse) UnmarshalJSON

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

type AIGatewayNewResponseEnvelope

type AIGatewayNewResponseEnvelope struct {
	Result  AIGatewayNewResponse             `json:"result,required"`
	Success bool                             `json:"success,required"`
	JSON    aiGatewayNewResponseEnvelopeJSON `json:"-"`
}

func (*AIGatewayNewResponseEnvelope) UnmarshalJSON

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

type AIGatewayNewResponseTask

type AIGatewayNewResponseTask struct {
	// gateway id
	ID                      string                                        `json:"id,required"`
	CacheInvalidateOnUpdate bool                                          `json:"cache_invalidate_on_update,required"`
	CacheTTL                int64                                         `json:"cache_ttl,required,nullable"`
	CollectLogs             bool                                          `json:"collect_logs,required"`
	CreatedAt               time.Time                                     `json:"created_at,required" format:"date-time"`
	ModifiedAt              time.Time                                     `json:"modified_at,required" format:"date-time"`
	RateLimitingInterval    int64                                         `json:"rate_limiting_interval,required,nullable"`
	RateLimitingLimit       int64                                         `json:"rate_limiting_limit,required,nullable"`
	RateLimitingTechnique   AIGatewayNewResponseTaskRateLimitingTechnique `json:"rate_limiting_technique,required"`
	JSON                    aiGatewayNewResponseTaskJSON                  `json:"-"`
}

func (*AIGatewayNewResponseTask) UnmarshalJSON

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

type AIGatewayNewResponseTaskRateLimitingTechnique added in v2.3.0

type AIGatewayNewResponseTaskRateLimitingTechnique string
const (
	AIGatewayNewResponseTaskRateLimitingTechniqueFixed   AIGatewayNewResponseTaskRateLimitingTechnique = "fixed"
	AIGatewayNewResponseTaskRateLimitingTechniqueSliding AIGatewayNewResponseTaskRateLimitingTechnique = "sliding"
)

func (AIGatewayNewResponseTaskRateLimitingTechnique) IsKnown added in v2.3.0

type AIGatewayService

type AIGatewayService struct {
	Options []option.RequestOption
	Logs    *LogService
}

AIGatewayService 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 NewAIGatewayService method instead.

func NewAIGatewayService

func NewAIGatewayService(opts ...option.RequestOption) (r *AIGatewayService)

NewAIGatewayService 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 (*AIGatewayService) Delete

Delete a Gateway

func (*AIGatewayService) Get

Fetch a Gateway

func (*AIGatewayService) List

List Gateways

func (*AIGatewayService) ListAutoPaging

List Gateways

func (*AIGatewayService) New

Create a new Gateway

func (*AIGatewayService) Update

Update a Gateway

type AIGatewayUpdateParams

type AIGatewayUpdateParams struct {
	AccountID               param.Field[string]                                     `path:"account_id,required"`
	CacheInvalidateOnUpdate param.Field[bool]                                       `json:"cache_invalidate_on_update,required"`
	CacheTTL                param.Field[int64]                                      `json:"cache_ttl,required"`
	CollectLogs             param.Field[bool]                                       `json:"collect_logs,required"`
	RateLimitingInterval    param.Field[int64]                                      `json:"rate_limiting_interval,required"`
	RateLimitingLimit       param.Field[int64]                                      `json:"rate_limiting_limit,required"`
	RateLimitingTechnique   param.Field[AIGatewayUpdateParamsRateLimitingTechnique] `json:"rate_limiting_technique,required"`
}

func (AIGatewayUpdateParams) MarshalJSON

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

type AIGatewayUpdateParamsRateLimitingTechnique added in v2.3.0

type AIGatewayUpdateParamsRateLimitingTechnique string
const (
	AIGatewayUpdateParamsRateLimitingTechniqueFixed   AIGatewayUpdateParamsRateLimitingTechnique = "fixed"
	AIGatewayUpdateParamsRateLimitingTechniqueSliding AIGatewayUpdateParamsRateLimitingTechnique = "sliding"
)

func (AIGatewayUpdateParamsRateLimitingTechnique) IsKnown added in v2.3.0

type AIGatewayUpdateResponse

type AIGatewayUpdateResponse struct {
	// gateway id
	ID                      string                                       `json:"id,required"`
	CacheInvalidateOnUpdate bool                                         `json:"cache_invalidate_on_update,required"`
	CacheTTL                int64                                        `json:"cache_ttl,required,nullable"`
	CollectLogs             bool                                         `json:"collect_logs,required"`
	CreatedAt               time.Time                                    `json:"created_at,required" format:"date-time"`
	ModifiedAt              time.Time                                    `json:"modified_at,required" format:"date-time"`
	RateLimitingInterval    int64                                        `json:"rate_limiting_interval,required,nullable"`
	RateLimitingLimit       int64                                        `json:"rate_limiting_limit,required,nullable"`
	RateLimitingTechnique   AIGatewayUpdateResponseRateLimitingTechnique `json:"rate_limiting_technique,required"`
	JSON                    aiGatewayUpdateResponseJSON                  `json:"-"`
}

func (*AIGatewayUpdateResponse) UnmarshalJSON

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

type AIGatewayUpdateResponseEnvelope

type AIGatewayUpdateResponseEnvelope struct {
	Result  AIGatewayUpdateResponse             `json:"result,required"`
	Success bool                                `json:"success,required"`
	JSON    aiGatewayUpdateResponseEnvelopeJSON `json:"-"`
}

func (*AIGatewayUpdateResponseEnvelope) UnmarshalJSON

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

type AIGatewayUpdateResponseRateLimitingTechnique added in v2.3.0

type AIGatewayUpdateResponseRateLimitingTechnique string
const (
	AIGatewayUpdateResponseRateLimitingTechniqueFixed   AIGatewayUpdateResponseRateLimitingTechnique = "fixed"
	AIGatewayUpdateResponseRateLimitingTechniqueSliding AIGatewayUpdateResponseRateLimitingTechnique = "sliding"
)

func (AIGatewayUpdateResponseRateLimitingTechnique) IsKnown added in v2.3.0

type ASN

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType

type AuditLogActorType = shared.AuditLogActorType

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

This is an alias to an internal type.

type AuditLogOwner

type AuditLogOwner = shared.AuditLogOwner

This is an alias to an internal type.

type AuditLogResource

type AuditLogResource = shared.AuditLogResource

This is an alias to an internal type.

type CertificateCA

type CertificateCA = shared.CertificateCA

The Certificate Authority that will issue the certificate

This is an alias to an internal type.

type CertificateRequestType

type CertificateRequestType = shared.CertificateRequestType

Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).

This is an alias to an internal type.

type CloudflareTunnel

type CloudflareTunnel = shared.CloudflareTunnel

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

This is an alias to an internal type.

type CloudflareTunnelConnection

type CloudflareTunnelConnection = shared.CloudflareTunnelConnection

This is an alias to an internal type.

type CloudflareTunnelStatus added in v2.3.0

type CloudflareTunnelStatus = shared.CloudflareTunnelStatus

The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).

This is an alias to an internal type.

type CloudflareTunnelTunType

type CloudflareTunnelTunType = shared.CloudflareTunnelTunType

The type of tunnel.

This is an alias to an internal type.

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type LogListParams added in v2.4.0

type LogListParams struct {
	AccountID param.Field[string]                 `path:"account_id,required"`
	Cached    param.Field[bool]                   `query:"cached"`
	Direction param.Field[LogListParamsDirection] `query:"direction"`
	EndDate   param.Field[time.Time]              `query:"end_date" format:"date-time"`
	OrderBy   param.Field[LogListParamsOrderBy]   `query:"order_by"`
	Page      param.Field[int64]                  `query:"page"`
	PerPage   param.Field[int64]                  `query:"per_page"`
	Search    param.Field[string]                 `query:"search"`
	StartDate param.Field[time.Time]              `query:"start_date" format:"date-time"`
	Success   param.Field[bool]                   `query:"success"`
}

func (LogListParams) URLQuery added in v2.4.0

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

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

type LogListParamsDirection added in v2.4.0

type LogListParamsDirection string
const (
	LogListParamsDirectionAsc  LogListParamsDirection = "asc"
	LogListParamsDirectionDesc LogListParamsDirection = "desc"
)

func (LogListParamsDirection) IsKnown added in v2.4.0

func (r LogListParamsDirection) IsKnown() bool

type LogListParamsOrderBy added in v2.4.0

type LogListParamsOrderBy string
const (
	LogListParamsOrderByCreatedAt LogListParamsOrderBy = "created_at"
	LogListParamsOrderByProvider  LogListParamsOrderBy = "provider"
)

func (LogListParamsOrderBy) IsKnown added in v2.4.0

func (r LogListParamsOrderBy) IsKnown() bool

type LogListResponse added in v2.4.0

type LogListResponse struct {
	ID                  string              `json:"id,required"`
	Cached              bool                `json:"cached,required"`
	CreatedAt           time.Time           `json:"created_at,required" format:"date-time"`
	Duration            int64               `json:"duration,required"`
	Model               string              `json:"model,required"`
	Path                string              `json:"path,required"`
	Provider            string              `json:"provider,required"`
	Request             string              `json:"request,required"`
	Response            string              `json:"response,required"`
	Success             bool                `json:"success,required"`
	TokensIn            int64               `json:"tokens_in,required"`
	TokensOut           int64               `json:"tokens_out,required"`
	Metadata            string              `json:"metadata"`
	RequestContentType  string              `json:"request_content_type"`
	RequestType         string              `json:"request_type"`
	ResponseContentType string              `json:"response_content_type"`
	StatusCode          int64               `json:"status_code"`
	Step                int64               `json:"step"`
	JSON                logListResponseJSON `json:"-"`
}

func (*LogListResponse) UnmarshalJSON added in v2.4.0

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

type LogService

type LogService struct {
	Options []option.RequestOption
}

LogService 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 NewLogService method instead.

func NewLogService

func NewLogService(opts ...option.RequestOption) (r *LogService)

NewLogService 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 (*LogService) List added in v2.4.0

List Gateway Logs

func (*LogService) ListAutoPaging added in v2.4.0

List Gateway Logs

type MemberParam

type MemberParam = shared.MemberParam

This is an alias to an internal type.

type MemberRoleParam

type MemberRoleParam = shared.MemberRoleParam

This is an alias to an internal type.

type MemberRolesPermissionsParam

type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

This is an alias to an internal type.

type MemberStatus added in v2.3.0

type MemberStatus = shared.MemberStatus

A member's status in the account.

This is an alias to an internal type.

type MemberUserParam

type MemberUserParam = shared.MemberUserParam

Details of the user associated to the membership.

This is an alias to an internal type.

type Permission

type Permission = shared.Permission

This is an alias to an internal type.

type PermissionGrant

type PermissionGrant = shared.PermissionGrant

This is an alias to an internal type.

type PermissionGrantParam

type PermissionGrantParam = shared.PermissionGrantParam

This is an alias to an internal type.

type ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type Role

type Role = shared.Role

This is an alias to an internal type.

type SortDirection

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

Jump to

Keyboard shortcuts

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