Documentation ¶
Index ¶
- type Error
- type OriginCACertificate
- type OriginCACertificateDeleteResponse
- type OriginCACertificateDeleteResponseEnvelope
- type OriginCACertificateDeleteResponseEnvelopeErrors
- type OriginCACertificateDeleteResponseEnvelopeMessages
- type OriginCACertificateDeleteResponseEnvelopeSuccess
- type OriginCACertificateGetResponse
- type OriginCACertificateGetResponseEnvelope
- type OriginCACertificateGetResponseEnvelopeErrors
- type OriginCACertificateGetResponseEnvelopeMessages
- type OriginCACertificateGetResponseEnvelopeSuccess
- type OriginCACertificateListParams
- type OriginCACertificateListResponseEnvelope
- type OriginCACertificateListResponseEnvelopeErrors
- type OriginCACertificateListResponseEnvelopeMessages
- type OriginCACertificateListResponseEnvelopeResultInfo
- type OriginCACertificateListResponseEnvelopeSuccess
- type OriginCACertificateNewParams
- type OriginCACertificateNewParamsRequestType
- type OriginCACertificateNewParamsRequestedValidity
- type OriginCACertificateNewResponse
- type OriginCACertificateNewResponseEnvelope
- type OriginCACertificateNewResponseEnvelopeErrors
- type OriginCACertificateNewResponseEnvelopeMessages
- type OriginCACertificateNewResponseEnvelopeSuccess
- type OriginCACertificateRequestType
- type OriginCACertificateRequestedValidity
- type OriginCACertificateService
- func (r *OriginCACertificateService) Delete(ctx context.Context, certificateID string, opts ...option.RequestOption) (res *OriginCACertificateDeleteResponse, err error)
- func (r *OriginCACertificateService) Get(ctx context.Context, certificateID string, opts ...option.RequestOption) (res *OriginCACertificateGetResponse, err error)
- func (r *OriginCACertificateService) List(ctx context.Context, query OriginCACertificateListParams, ...) (res *[]OriginCACertificate, err error)
- func (r *OriginCACertificateService) New(ctx context.Context, body OriginCACertificateNewParams, ...) (res *OriginCACertificateNewResponse, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OriginCACertificate ¶
type OriginCACertificate struct { // The Certificate Signing Request (CSR). Must be newline-encoded. Csr string `json:"csr,required"` // Array of hostnames or wildcard names (e.g., \*.example.com) bound to the // certificate. Hostnames []interface{} `json:"hostnames,required"` // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). RequestType OriginCACertificateRequestType `json:"request_type,required"` // The number of days for which the certificate should be valid. RequestedValidity OriginCACertificateRequestedValidity `json:"requested_validity,required"` // Identifier ID string `json:"id"` // The Origin CA certificate. Will be newline-encoded. Certificate string `json:"certificate"` // When the certificate will expire. ExpiresOn time.Time `json:"expires_on" format:"date-time"` JSON originCACertificateJSON `json:"-"` }
func (*OriginCACertificate) UnmarshalJSON ¶
func (r *OriginCACertificate) UnmarshalJSON(data []byte) (err error)
type OriginCACertificateDeleteResponse ¶
type OriginCACertificateDeleteResponse struct { // Identifier ID string `json:"id"` JSON originCACertificateDeleteResponseJSON `json:"-"` }
func (*OriginCACertificateDeleteResponse) UnmarshalJSON ¶
func (r *OriginCACertificateDeleteResponse) UnmarshalJSON(data []byte) (err error)
type OriginCACertificateDeleteResponseEnvelope ¶
type OriginCACertificateDeleteResponseEnvelope struct { Errors []OriginCACertificateDeleteResponseEnvelopeErrors `json:"errors,required"` Messages []OriginCACertificateDeleteResponseEnvelopeMessages `json:"messages,required"` Result OriginCACertificateDeleteResponse `json:"result,required"` // Whether the API call was successful Success OriginCACertificateDeleteResponseEnvelopeSuccess `json:"success,required"` JSON originCACertificateDeleteResponseEnvelopeJSON `json:"-"` }
func (*OriginCACertificateDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *OriginCACertificateDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type OriginCACertificateDeleteResponseEnvelopeErrors ¶
type OriginCACertificateDeleteResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON originCACertificateDeleteResponseEnvelopeErrorsJSON `json:"-"` }
func (*OriginCACertificateDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *OriginCACertificateDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type OriginCACertificateDeleteResponseEnvelopeMessages ¶
type OriginCACertificateDeleteResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON originCACertificateDeleteResponseEnvelopeMessagesJSON `json:"-"` }
func (*OriginCACertificateDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *OriginCACertificateDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type OriginCACertificateDeleteResponseEnvelopeSuccess ¶
type OriginCACertificateDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
OriginCACertificateDeleteResponseEnvelopeSuccessTrue OriginCACertificateDeleteResponseEnvelopeSuccess = true
)
type OriginCACertificateGetResponse ¶
type OriginCACertificateGetResponse interface {
ImplementsOriginCACertificatesOriginCACertificateGetResponse()
}
Union satisfied by origin_ca_certificates.OriginCACertificateGetResponseUnknown or shared.UnionString.
type OriginCACertificateGetResponseEnvelope ¶
type OriginCACertificateGetResponseEnvelope struct { Errors []OriginCACertificateGetResponseEnvelopeErrors `json:"errors,required"` Messages []OriginCACertificateGetResponseEnvelopeMessages `json:"messages,required"` Result OriginCACertificateGetResponse `json:"result,required"` // Whether the API call was successful Success OriginCACertificateGetResponseEnvelopeSuccess `json:"success,required"` JSON originCACertificateGetResponseEnvelopeJSON `json:"-"` }
func (*OriginCACertificateGetResponseEnvelope) UnmarshalJSON ¶
func (r *OriginCACertificateGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type OriginCACertificateGetResponseEnvelopeErrors ¶
type OriginCACertificateGetResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON originCACertificateGetResponseEnvelopeErrorsJSON `json:"-"` }
func (*OriginCACertificateGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *OriginCACertificateGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type OriginCACertificateGetResponseEnvelopeMessages ¶
type OriginCACertificateGetResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON originCACertificateGetResponseEnvelopeMessagesJSON `json:"-"` }
func (*OriginCACertificateGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *OriginCACertificateGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type OriginCACertificateGetResponseEnvelopeSuccess ¶
type OriginCACertificateGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
OriginCACertificateGetResponseEnvelopeSuccessTrue OriginCACertificateGetResponseEnvelopeSuccess = true
)
type OriginCACertificateListParams ¶
type OriginCACertificateListParams struct { }
type OriginCACertificateListResponseEnvelope ¶
type OriginCACertificateListResponseEnvelope struct { Errors []OriginCACertificateListResponseEnvelopeErrors `json:"errors,required"` Messages []OriginCACertificateListResponseEnvelopeMessages `json:"messages,required"` Result []OriginCACertificate `json:"result,required,nullable"` // Whether the API call was successful Success OriginCACertificateListResponseEnvelopeSuccess `json:"success,required"` ResultInfo OriginCACertificateListResponseEnvelopeResultInfo `json:"result_info"` JSON originCACertificateListResponseEnvelopeJSON `json:"-"` }
func (*OriginCACertificateListResponseEnvelope) UnmarshalJSON ¶
func (r *OriginCACertificateListResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type OriginCACertificateListResponseEnvelopeErrors ¶
type OriginCACertificateListResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON originCACertificateListResponseEnvelopeErrorsJSON `json:"-"` }
func (*OriginCACertificateListResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *OriginCACertificateListResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type OriginCACertificateListResponseEnvelopeMessages ¶
type OriginCACertificateListResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON originCACertificateListResponseEnvelopeMessagesJSON `json:"-"` }
func (*OriginCACertificateListResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *OriginCACertificateListResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type OriginCACertificateListResponseEnvelopeResultInfo ¶
type OriginCACertificateListResponseEnvelopeResultInfo 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 originCACertificateListResponseEnvelopeResultInfoJSON `json:"-"` }
func (*OriginCACertificateListResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *OriginCACertificateListResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type OriginCACertificateListResponseEnvelopeSuccess ¶
type OriginCACertificateListResponseEnvelopeSuccess bool
Whether the API call was successful
const (
OriginCACertificateListResponseEnvelopeSuccessTrue OriginCACertificateListResponseEnvelopeSuccess = true
)
type OriginCACertificateNewParams ¶
type OriginCACertificateNewParams struct { // The Certificate Signing Request (CSR). Must be newline-encoded. Csr param.Field[string] `json:"csr"` // Array of hostnames or wildcard names (e.g., \*.example.com) bound to the // certificate. Hostnames param.Field[[]interface{}] `json:"hostnames"` // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). RequestType param.Field[OriginCACertificateNewParamsRequestType] `json:"request_type"` // The number of days for which the certificate should be valid. RequestedValidity param.Field[OriginCACertificateNewParamsRequestedValidity] `json:"requested_validity"` }
func (OriginCACertificateNewParams) MarshalJSON ¶
func (r OriginCACertificateNewParams) MarshalJSON() (data []byte, err error)
type OriginCACertificateNewParamsRequestType ¶
type OriginCACertificateNewParamsRequestType string
Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).
const ( OriginCACertificateNewParamsRequestTypeOriginRsa OriginCACertificateNewParamsRequestType = "origin-rsa" OriginCACertificateNewParamsRequestTypeOriginEcc OriginCACertificateNewParamsRequestType = "origin-ecc" OriginCACertificateNewParamsRequestTypeKeylessCertificate OriginCACertificateNewParamsRequestType = "keyless-certificate" )
type OriginCACertificateNewParamsRequestedValidity ¶
type OriginCACertificateNewParamsRequestedValidity float64
The number of days for which the certificate should be valid.
const ( OriginCACertificateNewParamsRequestedValidity7 OriginCACertificateNewParamsRequestedValidity = 7 OriginCACertificateNewParamsRequestedValidity30 OriginCACertificateNewParamsRequestedValidity = 30 OriginCACertificateNewParamsRequestedValidity90 OriginCACertificateNewParamsRequestedValidity = 90 OriginCACertificateNewParamsRequestedValidity365 OriginCACertificateNewParamsRequestedValidity = 365 OriginCACertificateNewParamsRequestedValidity730 OriginCACertificateNewParamsRequestedValidity = 730 OriginCACertificateNewParamsRequestedValidity1095 OriginCACertificateNewParamsRequestedValidity = 1095 OriginCACertificateNewParamsRequestedValidity5475 OriginCACertificateNewParamsRequestedValidity = 5475 )
type OriginCACertificateNewResponse ¶
type OriginCACertificateNewResponse interface {
ImplementsOriginCACertificatesOriginCACertificateNewResponse()
}
Union satisfied by origin_ca_certificates.OriginCACertificateNewResponseUnknown or shared.UnionString.
type OriginCACertificateNewResponseEnvelope ¶
type OriginCACertificateNewResponseEnvelope struct { Errors []OriginCACertificateNewResponseEnvelopeErrors `json:"errors,required"` Messages []OriginCACertificateNewResponseEnvelopeMessages `json:"messages,required"` Result OriginCACertificateNewResponse `json:"result,required"` // Whether the API call was successful Success OriginCACertificateNewResponseEnvelopeSuccess `json:"success,required"` JSON originCACertificateNewResponseEnvelopeJSON `json:"-"` }
func (*OriginCACertificateNewResponseEnvelope) UnmarshalJSON ¶
func (r *OriginCACertificateNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type OriginCACertificateNewResponseEnvelopeErrors ¶
type OriginCACertificateNewResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON originCACertificateNewResponseEnvelopeErrorsJSON `json:"-"` }
func (*OriginCACertificateNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *OriginCACertificateNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type OriginCACertificateNewResponseEnvelopeMessages ¶
type OriginCACertificateNewResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON originCACertificateNewResponseEnvelopeMessagesJSON `json:"-"` }
func (*OriginCACertificateNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *OriginCACertificateNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type OriginCACertificateNewResponseEnvelopeSuccess ¶
type OriginCACertificateNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
OriginCACertificateNewResponseEnvelopeSuccessTrue OriginCACertificateNewResponseEnvelopeSuccess = true
)
type OriginCACertificateRequestType ¶
type OriginCACertificateRequestType string
Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).
const ( OriginCACertificateRequestTypeOriginRsa OriginCACertificateRequestType = "origin-rsa" OriginCACertificateRequestTypeOriginEcc OriginCACertificateRequestType = "origin-ecc" OriginCACertificateRequestTypeKeylessCertificate OriginCACertificateRequestType = "keyless-certificate" )
type OriginCACertificateRequestedValidity ¶
type OriginCACertificateRequestedValidity float64
The number of days for which the certificate should be valid.
const ( OriginCACertificateRequestedValidity7 OriginCACertificateRequestedValidity = 7 OriginCACertificateRequestedValidity30 OriginCACertificateRequestedValidity = 30 OriginCACertificateRequestedValidity90 OriginCACertificateRequestedValidity = 90 OriginCACertificateRequestedValidity365 OriginCACertificateRequestedValidity = 365 OriginCACertificateRequestedValidity730 OriginCACertificateRequestedValidity = 730 OriginCACertificateRequestedValidity1095 OriginCACertificateRequestedValidity = 1095 OriginCACertificateRequestedValidity5475 OriginCACertificateRequestedValidity = 5475 )
type OriginCACertificateService ¶
type OriginCACertificateService struct {
Options []option.RequestOption
}
OriginCACertificateService 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 NewOriginCACertificateService method instead.
func NewOriginCACertificateService ¶
func NewOriginCACertificateService(opts ...option.RequestOption) (r *OriginCACertificateService)
NewOriginCACertificateService 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 (*OriginCACertificateService) Delete ¶
func (r *OriginCACertificateService) Delete(ctx context.Context, certificateID string, opts ...option.RequestOption) (res *OriginCACertificateDeleteResponse, err error)
Revoke an existing Origin CA certificate by its serial number. Use your Origin CA Key as your User Service Key when calling this endpoint ([see above](#requests)).
func (*OriginCACertificateService) Get ¶
func (r *OriginCACertificateService) Get(ctx context.Context, certificateID string, opts ...option.RequestOption) (res *OriginCACertificateGetResponse, err error)
Get an existing Origin CA certificate by its serial number. Use your Origin CA Key as your User Service Key when calling this endpoint ([see above](#requests)).
func (*OriginCACertificateService) List ¶
func (r *OriginCACertificateService) List(ctx context.Context, query OriginCACertificateListParams, opts ...option.RequestOption) (res *[]OriginCACertificate, err error)
List all existing Origin CA certificates for a given zone. Use your Origin CA Key as your User Service Key when calling this endpoint ([see above](#requests)).
func (*OriginCACertificateService) New ¶
func (r *OriginCACertificateService) New(ctx context.Context, body OriginCACertificateNewParams, opts ...option.RequestOption) (res *OriginCACertificateNewResponse, err error)
Create an Origin CA certificate. Use your Origin CA Key as your User Service Key when calling this endpoint ([see above](#requests)).