Documentation
¶
Index ¶
- type CustomCertificateDeleteParams
- type CustomCertificateDeleteResponse
- type CustomCertificateDeleteResponseEnvelope
- type CustomCertificateDeleteResponseEnvelopeErrors
- type CustomCertificateDeleteResponseEnvelopeMessages
- type CustomCertificateDeleteResponseEnvelopeSuccess
- type CustomCertificateEditParams
- type CustomCertificateEditParamsBundleMethod
- type CustomCertificateEditParamsGeoRestrictions
- type CustomCertificateEditParamsGeoRestrictionsLabel
- type CustomCertificateEditResponse
- type CustomCertificateEditResponseEnvelope
- type CustomCertificateEditResponseEnvelopeErrors
- type CustomCertificateEditResponseEnvelopeMessages
- type CustomCertificateEditResponseEnvelopeSuccess
- type CustomCertificateGetParams
- type CustomCertificateGetResponse
- type CustomCertificateGetResponseEnvelope
- type CustomCertificateGetResponseEnvelopeErrors
- type CustomCertificateGetResponseEnvelopeMessages
- type CustomCertificateGetResponseEnvelopeSuccess
- type CustomCertificateListParams
- type CustomCertificateListParamsMatch
- type CustomCertificateNewParams
- type CustomCertificateNewParamsBundleMethod
- type CustomCertificateNewParamsGeoRestrictions
- type CustomCertificateNewParamsGeoRestrictionsLabel
- type CustomCertificateNewParamsType
- type CustomCertificateNewResponse
- type CustomCertificateNewResponseEnvelope
- type CustomCertificateNewResponseEnvelopeErrors
- type CustomCertificateNewResponseEnvelopeMessages
- type CustomCertificateNewResponseEnvelopeSuccess
- type CustomCertificateService
- func (r *CustomCertificateService) Delete(ctx context.Context, customCertificateID string, ...) (res *CustomCertificateDeleteResponse, err error)
- func (r *CustomCertificateService) Edit(ctx context.Context, customCertificateID string, ...) (res *CustomCertificateEditResponse, err error)
- func (r *CustomCertificateService) Get(ctx context.Context, customCertificateID string, ...) (res *CustomCertificateGetResponse, err error)
- func (r *CustomCertificateService) List(ctx context.Context, params CustomCertificateListParams, ...) (...)
- func (r *CustomCertificateService) ListAutoPaging(ctx context.Context, params CustomCertificateListParams, ...) ...
- func (r *CustomCertificateService) New(ctx context.Context, params CustomCertificateNewParams, ...) (res *CustomCertificateNewResponse, err error)
- type Error
- type PrioritizeService
- type PrioritizeUpdateParams
- type PrioritizeUpdateParamsCertificate
- type PrioritizeUpdateResponseEnvelope
- type PrioritizeUpdateResponseEnvelopeErrors
- type PrioritizeUpdateResponseEnvelopeMessages
- type PrioritizeUpdateResponseEnvelopeResultInfo
- type PrioritizeUpdateResponseEnvelopeSuccess
- type TLSCertificatesAndHostnamesCustomCertificate
- type TLSCertificatesAndHostnamesCustomCertificateBundleMethod
- type TLSCertificatesAndHostnamesCustomCertificateGeoRestrictions
- type TLSCertificatesAndHostnamesCustomCertificateGeoRestrictionsLabel
- type TLSCertificatesAndHostnamesCustomCertificateStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomCertificateDeleteResponse ¶
type CustomCertificateDeleteResponse struct {
// Identifier
ID string `json:"id"`
JSON customCertificateDeleteResponseJSON `json:"-"`
}
func (*CustomCertificateDeleteResponse) UnmarshalJSON ¶
func (r *CustomCertificateDeleteResponse) UnmarshalJSON(data []byte) (err error)
type CustomCertificateDeleteResponseEnvelope ¶
type CustomCertificateDeleteResponseEnvelope struct {
Errors []CustomCertificateDeleteResponseEnvelopeErrors `json:"errors,required"`
Messages []CustomCertificateDeleteResponseEnvelopeMessages `json:"messages,required"`
Result CustomCertificateDeleteResponse `json:"result,required"`
// Whether the API call was successful
Success CustomCertificateDeleteResponseEnvelopeSuccess `json:"success,required"`
JSON customCertificateDeleteResponseEnvelopeJSON `json:"-"`
}
func (*CustomCertificateDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *CustomCertificateDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type CustomCertificateDeleteResponseEnvelopeErrors ¶
type CustomCertificateDeleteResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON customCertificateDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*CustomCertificateDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *CustomCertificateDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type CustomCertificateDeleteResponseEnvelopeMessages ¶
type CustomCertificateDeleteResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON customCertificateDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*CustomCertificateDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *CustomCertificateDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type CustomCertificateDeleteResponseEnvelopeSuccess ¶
type CustomCertificateDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
CustomCertificateDeleteResponseEnvelopeSuccessTrue CustomCertificateDeleteResponseEnvelopeSuccess = true
)
func (CustomCertificateDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r CustomCertificateDeleteResponseEnvelopeSuccess) IsKnown() bool
type CustomCertificateEditParams ¶
type CustomCertificateEditParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// A ubiquitous bundle has the highest probability of being verified everywhere,
// even by clients using outdated or unusual trust stores. An optimal bundle uses
// the shortest chain and newest intermediates. And the force bundle verifies the
// chain, but does not otherwise modify it.
BundleMethod param.Field[CustomCertificateEditParamsBundleMethod] `json:"bundle_method"`
// The zone's SSL certificate or certificate and the intermediate(s).
Certificate param.Field[string] `json:"certificate"`
// Specify the region where your private key can be held locally for optimal TLS
// performance. HTTPS connections to any excluded data center will still be fully
// encrypted, but will incur some latency while Keyless SSL is used to complete the
// handshake with the nearest allowed data center. Options allow distribution to
// only to U.S. data centers, only to E.U. data centers, or only to highest
// security data centers. Default distribution is to all Cloudflare datacenters,
// for optimal performance.
GeoRestrictions param.Field[CustomCertificateEditParamsGeoRestrictions] `json:"geo_restrictions"`
// Specify the policy that determines the region where your private key will be
// held locally. HTTPS connections to any excluded data center will still be fully
// encrypted, but will incur some latency while Keyless SSL is used to complete the
// handshake with the nearest allowed data center. Any combination of countries,
// specified by their two letter country code
// (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
// can be chosen, such as 'country: IN', as well as 'region: EU' which refers to
// the EU region. If there are too few data centers satisfying the policy, it will
// be rejected.
Policy param.Field[string] `json:"policy"`
// The zone's private key.
PrivateKey param.Field[string] `json:"private_key"`
}
func (CustomCertificateEditParams) MarshalJSON ¶
func (r CustomCertificateEditParams) MarshalJSON() (data []byte, err error)
type CustomCertificateEditParamsBundleMethod ¶
type CustomCertificateEditParamsBundleMethod string
A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.
const ( CustomCertificateEditParamsBundleMethodUbiquitous CustomCertificateEditParamsBundleMethod = "ubiquitous" CustomCertificateEditParamsBundleMethodOptimal CustomCertificateEditParamsBundleMethod = "optimal" CustomCertificateEditParamsBundleMethodForce CustomCertificateEditParamsBundleMethod = "force" )
func (CustomCertificateEditParamsBundleMethod) IsKnown ¶
func (r CustomCertificateEditParamsBundleMethod) IsKnown() bool
type CustomCertificateEditParamsGeoRestrictions ¶
type CustomCertificateEditParamsGeoRestrictions struct {
Label param.Field[CustomCertificateEditParamsGeoRestrictionsLabel] `json:"label"`
}
Specify the region where your private key can be held locally for optimal TLS performance. HTTPS connections to any excluded data center will still be fully encrypted, but will incur some latency while Keyless SSL is used to complete the handshake with the nearest allowed data center. Options allow distribution to only to U.S. data centers, only to E.U. data centers, or only to highest security data centers. Default distribution is to all Cloudflare datacenters, for optimal performance.
func (CustomCertificateEditParamsGeoRestrictions) MarshalJSON ¶
func (r CustomCertificateEditParamsGeoRestrictions) MarshalJSON() (data []byte, err error)
type CustomCertificateEditParamsGeoRestrictionsLabel ¶
type CustomCertificateEditParamsGeoRestrictionsLabel string
const ( CustomCertificateEditParamsGeoRestrictionsLabelUs CustomCertificateEditParamsGeoRestrictionsLabel = "us" CustomCertificateEditParamsGeoRestrictionsLabelEu CustomCertificateEditParamsGeoRestrictionsLabel = "eu" CustomCertificateEditParamsGeoRestrictionsLabelHighestSecurity CustomCertificateEditParamsGeoRestrictionsLabel = "highest_security" )
func (CustomCertificateEditParamsGeoRestrictionsLabel) IsKnown ¶
func (r CustomCertificateEditParamsGeoRestrictionsLabel) IsKnown() bool
type CustomCertificateEditResponse ¶
type CustomCertificateEditResponse interface {
ImplementsCustomCertificatesCustomCertificateEditResponse()
}
Union satisfied by custom_certificates.CustomCertificateEditResponseUnknown or shared.UnionString.
type CustomCertificateEditResponseEnvelope ¶
type CustomCertificateEditResponseEnvelope struct {
Errors []CustomCertificateEditResponseEnvelopeErrors `json:"errors,required"`
Messages []CustomCertificateEditResponseEnvelopeMessages `json:"messages,required"`
Result CustomCertificateEditResponse `json:"result,required"`
// Whether the API call was successful
Success CustomCertificateEditResponseEnvelopeSuccess `json:"success,required"`
JSON customCertificateEditResponseEnvelopeJSON `json:"-"`
}
func (*CustomCertificateEditResponseEnvelope) UnmarshalJSON ¶
func (r *CustomCertificateEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type CustomCertificateEditResponseEnvelopeErrors ¶
type CustomCertificateEditResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON customCertificateEditResponseEnvelopeErrorsJSON `json:"-"`
}
func (*CustomCertificateEditResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *CustomCertificateEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type CustomCertificateEditResponseEnvelopeMessages ¶
type CustomCertificateEditResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON customCertificateEditResponseEnvelopeMessagesJSON `json:"-"`
}
func (*CustomCertificateEditResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *CustomCertificateEditResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type CustomCertificateEditResponseEnvelopeSuccess ¶
type CustomCertificateEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
CustomCertificateEditResponseEnvelopeSuccessTrue CustomCertificateEditResponseEnvelopeSuccess = true
)
func (CustomCertificateEditResponseEnvelopeSuccess) IsKnown ¶
func (r CustomCertificateEditResponseEnvelopeSuccess) IsKnown() bool
type CustomCertificateGetResponse ¶
type CustomCertificateGetResponse interface {
ImplementsCustomCertificatesCustomCertificateGetResponse()
}
Union satisfied by custom_certificates.CustomCertificateGetResponseUnknown or shared.UnionString.
type CustomCertificateGetResponseEnvelope ¶
type CustomCertificateGetResponseEnvelope struct {
Errors []CustomCertificateGetResponseEnvelopeErrors `json:"errors,required"`
Messages []CustomCertificateGetResponseEnvelopeMessages `json:"messages,required"`
Result CustomCertificateGetResponse `json:"result,required"`
// Whether the API call was successful
Success CustomCertificateGetResponseEnvelopeSuccess `json:"success,required"`
JSON customCertificateGetResponseEnvelopeJSON `json:"-"`
}
func (*CustomCertificateGetResponseEnvelope) UnmarshalJSON ¶
func (r *CustomCertificateGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type CustomCertificateGetResponseEnvelopeErrors ¶
type CustomCertificateGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON customCertificateGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*CustomCertificateGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *CustomCertificateGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type CustomCertificateGetResponseEnvelopeMessages ¶
type CustomCertificateGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON customCertificateGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*CustomCertificateGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *CustomCertificateGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type CustomCertificateGetResponseEnvelopeSuccess ¶
type CustomCertificateGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
CustomCertificateGetResponseEnvelopeSuccessTrue CustomCertificateGetResponseEnvelopeSuccess = true
)
func (CustomCertificateGetResponseEnvelopeSuccess) IsKnown ¶
func (r CustomCertificateGetResponseEnvelopeSuccess) IsKnown() bool
type CustomCertificateListParams ¶
type CustomCertificateListParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// Whether to match all search requirements or at least one (any).
Match param.Field[CustomCertificateListParamsMatch] `query:"match"`
// Page number of paginated results.
Page param.Field[float64] `query:"page"`
// Number of zones per page.
PerPage param.Field[float64] `query:"per_page"`
}
func (CustomCertificateListParams) URLQuery ¶
func (r CustomCertificateListParams) URLQuery() (v url.Values)
URLQuery serializes CustomCertificateListParams's query parameters as `url.Values`.
type CustomCertificateListParamsMatch ¶
type CustomCertificateListParamsMatch string
Whether to match all search requirements or at least one (any).
const ( CustomCertificateListParamsMatchAny CustomCertificateListParamsMatch = "any" CustomCertificateListParamsMatchAll CustomCertificateListParamsMatch = "all" )
func (CustomCertificateListParamsMatch) IsKnown ¶
func (r CustomCertificateListParamsMatch) IsKnown() bool
type CustomCertificateNewParams ¶
type CustomCertificateNewParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// The zone's SSL certificate or certificate and the intermediate(s).
Certificate param.Field[string] `json:"certificate,required"`
// The zone's private key.
PrivateKey param.Field[string] `json:"private_key,required"`
// A ubiquitous bundle has the highest probability of being verified everywhere,
// even by clients using outdated or unusual trust stores. An optimal bundle uses
// the shortest chain and newest intermediates. And the force bundle verifies the
// chain, but does not otherwise modify it.
BundleMethod param.Field[CustomCertificateNewParamsBundleMethod] `json:"bundle_method"`
// Specify the region where your private key can be held locally for optimal TLS
// performance. HTTPS connections to any excluded data center will still be fully
// encrypted, but will incur some latency while Keyless SSL is used to complete the
// handshake with the nearest allowed data center. Options allow distribution to
// only to U.S. data centers, only to E.U. data centers, or only to highest
// security data centers. Default distribution is to all Cloudflare datacenters,
// for optimal performance.
GeoRestrictions param.Field[CustomCertificateNewParamsGeoRestrictions] `json:"geo_restrictions"`
// Specify the policy that determines the region where your private key will be
// held locally. HTTPS connections to any excluded data center will still be fully
// encrypted, but will incur some latency while Keyless SSL is used to complete the
// handshake with the nearest allowed data center. Any combination of countries,
// specified by their two letter country code
// (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
// can be chosen, such as 'country: IN', as well as 'region: EU' which refers to
// the EU region. If there are too few data centers satisfying the policy, it will
// be rejected.
Policy param.Field[string] `json:"policy"`
// The type 'legacy_custom' enables support for legacy clients which do not include
// SNI in the TLS handshake.
Type param.Field[CustomCertificateNewParamsType] `json:"type"`
}
func (CustomCertificateNewParams) MarshalJSON ¶
func (r CustomCertificateNewParams) MarshalJSON() (data []byte, err error)
type CustomCertificateNewParamsBundleMethod ¶
type CustomCertificateNewParamsBundleMethod string
A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.
const ( CustomCertificateNewParamsBundleMethodUbiquitous CustomCertificateNewParamsBundleMethod = "ubiquitous" CustomCertificateNewParamsBundleMethodOptimal CustomCertificateNewParamsBundleMethod = "optimal" CustomCertificateNewParamsBundleMethodForce CustomCertificateNewParamsBundleMethod = "force" )
func (CustomCertificateNewParamsBundleMethod) IsKnown ¶
func (r CustomCertificateNewParamsBundleMethod) IsKnown() bool
type CustomCertificateNewParamsGeoRestrictions ¶
type CustomCertificateNewParamsGeoRestrictions struct {
Label param.Field[CustomCertificateNewParamsGeoRestrictionsLabel] `json:"label"`
}
Specify the region where your private key can be held locally for optimal TLS performance. HTTPS connections to any excluded data center will still be fully encrypted, but will incur some latency while Keyless SSL is used to complete the handshake with the nearest allowed data center. Options allow distribution to only to U.S. data centers, only to E.U. data centers, or only to highest security data centers. Default distribution is to all Cloudflare datacenters, for optimal performance.
func (CustomCertificateNewParamsGeoRestrictions) MarshalJSON ¶
func (r CustomCertificateNewParamsGeoRestrictions) MarshalJSON() (data []byte, err error)
type CustomCertificateNewParamsGeoRestrictionsLabel ¶
type CustomCertificateNewParamsGeoRestrictionsLabel string
const ( CustomCertificateNewParamsGeoRestrictionsLabelUs CustomCertificateNewParamsGeoRestrictionsLabel = "us" CustomCertificateNewParamsGeoRestrictionsLabelEu CustomCertificateNewParamsGeoRestrictionsLabel = "eu" CustomCertificateNewParamsGeoRestrictionsLabelHighestSecurity CustomCertificateNewParamsGeoRestrictionsLabel = "highest_security" )
func (CustomCertificateNewParamsGeoRestrictionsLabel) IsKnown ¶
func (r CustomCertificateNewParamsGeoRestrictionsLabel) IsKnown() bool
type CustomCertificateNewParamsType ¶
type CustomCertificateNewParamsType string
The type 'legacy_custom' enables support for legacy clients which do not include SNI in the TLS handshake.
const ( CustomCertificateNewParamsTypeLegacyCustom CustomCertificateNewParamsType = "legacy_custom" CustomCertificateNewParamsTypeSniCustom CustomCertificateNewParamsType = "sni_custom" )
func (CustomCertificateNewParamsType) IsKnown ¶
func (r CustomCertificateNewParamsType) IsKnown() bool
type CustomCertificateNewResponse ¶
type CustomCertificateNewResponse interface {
ImplementsCustomCertificatesCustomCertificateNewResponse()
}
Union satisfied by custom_certificates.CustomCertificateNewResponseUnknown or shared.UnionString.
type CustomCertificateNewResponseEnvelope ¶
type CustomCertificateNewResponseEnvelope struct {
Errors []CustomCertificateNewResponseEnvelopeErrors `json:"errors,required"`
Messages []CustomCertificateNewResponseEnvelopeMessages `json:"messages,required"`
Result CustomCertificateNewResponse `json:"result,required"`
// Whether the API call was successful
Success CustomCertificateNewResponseEnvelopeSuccess `json:"success,required"`
JSON customCertificateNewResponseEnvelopeJSON `json:"-"`
}
func (*CustomCertificateNewResponseEnvelope) UnmarshalJSON ¶
func (r *CustomCertificateNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type CustomCertificateNewResponseEnvelopeErrors ¶
type CustomCertificateNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON customCertificateNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*CustomCertificateNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *CustomCertificateNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type CustomCertificateNewResponseEnvelopeMessages ¶
type CustomCertificateNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON customCertificateNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*CustomCertificateNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *CustomCertificateNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type CustomCertificateNewResponseEnvelopeSuccess ¶
type CustomCertificateNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
CustomCertificateNewResponseEnvelopeSuccessTrue CustomCertificateNewResponseEnvelopeSuccess = true
)
func (CustomCertificateNewResponseEnvelopeSuccess) IsKnown ¶
func (r CustomCertificateNewResponseEnvelopeSuccess) IsKnown() bool
type CustomCertificateService ¶
type CustomCertificateService struct {
Options []option.RequestOption
Prioritize *PrioritizeService
}
CustomCertificateService 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 NewCustomCertificateService method instead.
func NewCustomCertificateService ¶
func NewCustomCertificateService(opts ...option.RequestOption) (r *CustomCertificateService)
NewCustomCertificateService 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 (*CustomCertificateService) Delete ¶
func (r *CustomCertificateService) Delete(ctx context.Context, customCertificateID string, body CustomCertificateDeleteParams, opts ...option.RequestOption) (res *CustomCertificateDeleteResponse, err error)
Remove a SSL certificate from a zone.
func (*CustomCertificateService) Edit ¶
func (r *CustomCertificateService) Edit(ctx context.Context, customCertificateID string, params CustomCertificateEditParams, opts ...option.RequestOption) (res *CustomCertificateEditResponse, err error)
Upload a new private key and/or PEM/CRT for the SSL certificate. Note: PATCHing a configuration for sni_custom certificates will result in a new resource id being returned, and the previous one being deleted.
func (*CustomCertificateService) Get ¶
func (r *CustomCertificateService) Get(ctx context.Context, customCertificateID string, query CustomCertificateGetParams, opts ...option.RequestOption) (res *CustomCertificateGetResponse, err error)
SSL Configuration Details
func (*CustomCertificateService) List ¶
func (r *CustomCertificateService) List(ctx context.Context, params CustomCertificateListParams, opts ...option.RequestOption) (res *shared.V4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], err error)
List, search, and filter all of your custom SSL certificates. The higher priority will break ties across overlapping 'legacy_custom' certificates, but 'legacy_custom' certificates will always supercede 'sni_custom' certificates.
func (*CustomCertificateService) ListAutoPaging ¶
func (r *CustomCertificateService) ListAutoPaging(ctx context.Context, params CustomCertificateListParams, opts ...option.RequestOption) *shared.V4PagePaginationArrayAutoPager[TLSCertificatesAndHostnamesCustomCertificate]
List, search, and filter all of your custom SSL certificates. The higher priority will break ties across overlapping 'legacy_custom' certificates, but 'legacy_custom' certificates will always supercede 'sni_custom' certificates.
func (*CustomCertificateService) New ¶
func (r *CustomCertificateService) New(ctx context.Context, params CustomCertificateNewParams, opts ...option.RequestOption) (res *CustomCertificateNewResponse, err error)
Upload a new SSL certificate for a zone.
type PrioritizeService ¶
type PrioritizeService struct {
Options []option.RequestOption
}
PrioritizeService 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 NewPrioritizeService method instead.
func NewPrioritizeService ¶
func NewPrioritizeService(opts ...option.RequestOption) (r *PrioritizeService)
NewPrioritizeService 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 (*PrioritizeService) Update ¶
func (r *PrioritizeService) Update(ctx context.Context, params PrioritizeUpdateParams, opts ...option.RequestOption) (res *[]TLSCertificatesAndHostnamesCustomCertificate, err error)
If a zone has multiple SSL certificates, you can set the order in which they should be used during a request. The higher priority will break ties across overlapping 'legacy_custom' certificates.
type PrioritizeUpdateParams ¶
type PrioritizeUpdateParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// Array of ordered certificates.
Certificates param.Field[[]PrioritizeUpdateParamsCertificate] `json:"certificates,required"`
}
func (PrioritizeUpdateParams) MarshalJSON ¶
func (r PrioritizeUpdateParams) MarshalJSON() (data []byte, err error)
type PrioritizeUpdateParamsCertificate ¶
type PrioritizeUpdateParamsCertificate struct {
// The order/priority in which the certificate will be used in a request. The
// higher priority will break ties across overlapping 'legacy_custom' certificates,
// but 'legacy_custom' certificates will always supercede 'sni_custom'
// certificates.
Priority param.Field[float64] `json:"priority"`
}
func (PrioritizeUpdateParamsCertificate) MarshalJSON ¶
func (r PrioritizeUpdateParamsCertificate) MarshalJSON() (data []byte, err error)
type PrioritizeUpdateResponseEnvelope ¶
type PrioritizeUpdateResponseEnvelope struct {
Errors []PrioritizeUpdateResponseEnvelopeErrors `json:"errors,required"`
Messages []PrioritizeUpdateResponseEnvelopeMessages `json:"messages,required"`
Result []TLSCertificatesAndHostnamesCustomCertificate `json:"result,required,nullable"`
// Whether the API call was successful
Success PrioritizeUpdateResponseEnvelopeSuccess `json:"success,required"`
ResultInfo PrioritizeUpdateResponseEnvelopeResultInfo `json:"result_info"`
JSON prioritizeUpdateResponseEnvelopeJSON `json:"-"`
}
func (*PrioritizeUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *PrioritizeUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PrioritizeUpdateResponseEnvelopeErrors ¶
type PrioritizeUpdateResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON prioritizeUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*PrioritizeUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *PrioritizeUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type PrioritizeUpdateResponseEnvelopeMessages ¶
type PrioritizeUpdateResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON prioritizeUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*PrioritizeUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *PrioritizeUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type PrioritizeUpdateResponseEnvelopeResultInfo ¶
type PrioritizeUpdateResponseEnvelopeResultInfo struct {
// Total number of results for the requested service
Count float64 `json:"count"`
// Current page within paginated list of results
Page float64 `json:"page"`
// Number of results per page of results
PerPage float64 `json:"per_page"`
// Total results available without any search parameters
TotalCount float64 `json:"total_count"`
JSON prioritizeUpdateResponseEnvelopeResultInfoJSON `json:"-"`
}
func (*PrioritizeUpdateResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *PrioritizeUpdateResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type PrioritizeUpdateResponseEnvelopeSuccess ¶
type PrioritizeUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
PrioritizeUpdateResponseEnvelopeSuccessTrue PrioritizeUpdateResponseEnvelopeSuccess = true
)
func (PrioritizeUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r PrioritizeUpdateResponseEnvelopeSuccess) IsKnown() bool
type TLSCertificatesAndHostnamesCustomCertificate ¶
type TLSCertificatesAndHostnamesCustomCertificate struct {
// Identifier
ID string `json:"id,required"`
// A ubiquitous bundle has the highest probability of being verified everywhere,
// even by clients using outdated or unusual trust stores. An optimal bundle uses
// the shortest chain and newest intermediates. And the force bundle verifies the
// chain, but does not otherwise modify it.
BundleMethod TLSCertificatesAndHostnamesCustomCertificateBundleMethod `json:"bundle_method,required"`
// When the certificate from the authority expires.
ExpiresOn time.Time `json:"expires_on,required" format:"date-time"`
Hosts []string `json:"hosts,required"`
// The certificate authority that issued the certificate.
Issuer string `json:"issuer,required"`
// When the certificate was last modified.
ModifiedOn time.Time `json:"modified_on,required" format:"date-time"`
// The order/priority in which the certificate will be used in a request. The
// higher priority will break ties across overlapping 'legacy_custom' certificates,
// but 'legacy_custom' certificates will always supercede 'sni_custom'
// certificates.
Priority float64 `json:"priority,required"`
// The type of hash used for the certificate.
Signature string `json:"signature,required"`
// Status of the zone's custom SSL.
Status TLSCertificatesAndHostnamesCustomCertificateStatus `json:"status,required"`
// When the certificate was uploaded to Cloudflare.
UploadedOn time.Time `json:"uploaded_on,required" format:"date-time"`
// Identifier
ZoneID string `json:"zone_id,required"`
// Specify the region where your private key can be held locally for optimal TLS
// performance. HTTPS connections to any excluded data center will still be fully
// encrypted, but will incur some latency while Keyless SSL is used to complete the
// handshake with the nearest allowed data center. Options allow distribution to
// only to U.S. data centers, only to E.U. data centers, or only to highest
// security data centers. Default distribution is to all Cloudflare datacenters,
// for optimal performance.
GeoRestrictions TLSCertificatesAndHostnamesCustomCertificateGeoRestrictions `json:"geo_restrictions"`
KeylessServer keyless_certificates.TLSCertificatesAndHostnamesBase `json:"keyless_server"`
// Specify the policy that determines the region where your private key will be
// held locally. HTTPS connections to any excluded data center will still be fully
// encrypted, but will incur some latency while Keyless SSL is used to complete the
// handshake with the nearest allowed data center. Any combination of countries,
// specified by their two letter country code
// (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
// can be chosen, such as 'country: IN', as well as 'region: EU' which refers to
// the EU region. If there are too few data centers satisfying the policy, it will
// be rejected.
Policy string `json:"policy"`
JSON tlsCertificatesAndHostnamesCustomCertificateJSON `json:"-"`
}
func (*TLSCertificatesAndHostnamesCustomCertificate) UnmarshalJSON ¶
func (r *TLSCertificatesAndHostnamesCustomCertificate) UnmarshalJSON(data []byte) (err error)
type TLSCertificatesAndHostnamesCustomCertificateBundleMethod ¶
type TLSCertificatesAndHostnamesCustomCertificateBundleMethod string
A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.
const ( TLSCertificatesAndHostnamesCustomCertificateBundleMethodUbiquitous TLSCertificatesAndHostnamesCustomCertificateBundleMethod = "ubiquitous" TLSCertificatesAndHostnamesCustomCertificateBundleMethodOptimal TLSCertificatesAndHostnamesCustomCertificateBundleMethod = "optimal" TLSCertificatesAndHostnamesCustomCertificateBundleMethodForce TLSCertificatesAndHostnamesCustomCertificateBundleMethod = "force" )
func (TLSCertificatesAndHostnamesCustomCertificateBundleMethod) IsKnown ¶
func (r TLSCertificatesAndHostnamesCustomCertificateBundleMethod) IsKnown() bool
type TLSCertificatesAndHostnamesCustomCertificateGeoRestrictions ¶
type TLSCertificatesAndHostnamesCustomCertificateGeoRestrictions struct {
Label TLSCertificatesAndHostnamesCustomCertificateGeoRestrictionsLabel `json:"label"`
JSON tlsCertificatesAndHostnamesCustomCertificateGeoRestrictionsJSON `json:"-"`
}
Specify the region where your private key can be held locally for optimal TLS performance. HTTPS connections to any excluded data center will still be fully encrypted, but will incur some latency while Keyless SSL is used to complete the handshake with the nearest allowed data center. Options allow distribution to only to U.S. data centers, only to E.U. data centers, or only to highest security data centers. Default distribution is to all Cloudflare datacenters, for optimal performance.
func (*TLSCertificatesAndHostnamesCustomCertificateGeoRestrictions) UnmarshalJSON ¶
func (r *TLSCertificatesAndHostnamesCustomCertificateGeoRestrictions) UnmarshalJSON(data []byte) (err error)
type TLSCertificatesAndHostnamesCustomCertificateGeoRestrictionsLabel ¶
type TLSCertificatesAndHostnamesCustomCertificateGeoRestrictionsLabel string
const ( TLSCertificatesAndHostnamesCustomCertificateGeoRestrictionsLabelUs TLSCertificatesAndHostnamesCustomCertificateGeoRestrictionsLabel = "us" TLSCertificatesAndHostnamesCustomCertificateGeoRestrictionsLabelEu TLSCertificatesAndHostnamesCustomCertificateGeoRestrictionsLabel = "eu" TLSCertificatesAndHostnamesCustomCertificateGeoRestrictionsLabelHighestSecurity TLSCertificatesAndHostnamesCustomCertificateGeoRestrictionsLabel = "highest_security" )
func (TLSCertificatesAndHostnamesCustomCertificateGeoRestrictionsLabel) IsKnown ¶
func (r TLSCertificatesAndHostnamesCustomCertificateGeoRestrictionsLabel) IsKnown() bool
type TLSCertificatesAndHostnamesCustomCertificateStatus ¶
type TLSCertificatesAndHostnamesCustomCertificateStatus string
Status of the zone's custom SSL.
const ( TLSCertificatesAndHostnamesCustomCertificateStatusActive TLSCertificatesAndHostnamesCustomCertificateStatus = "active" TLSCertificatesAndHostnamesCustomCertificateStatusExpired TLSCertificatesAndHostnamesCustomCertificateStatus = "expired" TLSCertificatesAndHostnamesCustomCertificateStatusDeleted TLSCertificatesAndHostnamesCustomCertificateStatus = "deleted" TLSCertificatesAndHostnamesCustomCertificateStatusPending TLSCertificatesAndHostnamesCustomCertificateStatus = "pending" TLSCertificatesAndHostnamesCustomCertificateStatusInitializing TLSCertificatesAndHostnamesCustomCertificateStatus = "initializing" )
func (TLSCertificatesAndHostnamesCustomCertificateStatus) IsKnown ¶
func (r TLSCertificatesAndHostnamesCustomCertificateStatus) IsKnown() bool