ips

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 12 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 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.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN added in v2.1.0

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam added in v2.1.0

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 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 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 IPListParams

type IPListParams struct {
	// Specified as `jdcloud` to list IPs used by JD Cloud data centers.
	Networks param.Field[string] `query:"networks"`
}

func (IPListParams) URLQuery

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

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

type IPListResponse

type IPListResponse struct {
	// A digest of the IP data. Useful for determining if the data has changed.
	Etag         string             `json:"etag"`
	IPV4CIDRs    interface{}        `json:"ipv4_cidrs,required"`
	IPV6CIDRs    interface{}        `json:"ipv6_cidrs,required"`
	JDCloudCIDRs interface{}        `json:"jdcloud_cidrs,required"`
	JSON         ipListResponseJSON `json:"-"`
	// contains filtered or unexported fields
}

func (IPListResponse) AsUnion

func (r IPListResponse) AsUnion() IPListResponseUnion

func (*IPListResponse) UnmarshalJSON

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

type IPListResponseEnvelope

type IPListResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success IPListResponseEnvelopeSuccess `json:"success,required"`
	Result  IPListResponse                `json:"result"`
	JSON    ipListResponseEnvelopeJSON    `json:"-"`
}

func (*IPListResponseEnvelope) UnmarshalJSON

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

type IPListResponseEnvelopeSuccess

type IPListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IPListResponseEnvelopeSuccessTrue IPListResponseEnvelopeSuccess = true
)

func (IPListResponseEnvelopeSuccess) IsKnown

func (r IPListResponseEnvelopeSuccess) IsKnown() bool

type IPListResponseUnion

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

Union satisfied by ips.IPs or ips.JDCloudIPs.

type IPService

type IPService struct {
	Options []option.RequestOption
}

IPService 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 NewIPService method instead.

func NewIPService

func NewIPService(opts ...option.RequestOption) (r *IPService)

NewIPService 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 (*IPService) List

func (r *IPService) List(ctx context.Context, query IPListParams, opts ...option.RequestOption) (res *IPListResponse, err error)

Get IPs used on the Cloudflare/JD Cloud network, see https://www.cloudflare.com/ips for Cloudflare IPs or https://developers.cloudflare.com/china-network/reference/infrastructure/ for JD Cloud IPs.

type IPs

type IPs struct {
	// A digest of the IP data. Useful for determining if the data has changed.
	Etag string `json:"etag"`
	// List of Cloudflare IPv4 CIDR addresses.
	IPV4CIDRs []string `json:"ipv4_cidrs"`
	// List of Cloudflare IPv6 CIDR addresses.
	IPV6CIDRs []string `json:"ipv6_cidrs"`
	JSON      ipsJSON  `json:"-"`
}

func (*IPs) UnmarshalJSON

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

type JDCloudIPs

type JDCloudIPs struct {
	// A digest of the IP data. Useful for determining if the data has changed.
	Etag string `json:"etag"`
	// List of Cloudflare IPv4 CIDR addresses.
	IPV4CIDRs []string `json:"ipv4_cidrs"`
	// List of Cloudflare IPv6 CIDR addresses.
	IPV6CIDRs []string `json:"ipv6_cidrs"`
	// List IPv4 and IPv6 CIDRs, only populated if `?networks=jdcloud` is used.
	JDCloudCIDRs []string       `json:"jdcloud_cidrs"`
	JSON         JDCloudIPsJSON `json:"-"`
}

func (*JDCloudIPs) UnmarshalJSON

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

type JDCloudIPsJSON

type JDCloudIPsJSON struct {
	Etag         apijson.Field
	IPV4CIDRs    apijson.Field
	IPV6CIDRs    apijson.Field
	JDCloudCIDRs apijson.Field

	ExtraFields map[string]apijson.Field
	// contains filtered or unexported fields
}

JDCloudIPsJSON contains the JSON metadata for the struct JDCloudIPs

func (JDCloudIPsJSON) RawJSON

func (r JDCloudIPsJSON) RawJSON() string

type Member added in v2.1.0

type Member = shared.Member

This is an alias to an internal type.

type MemberParam added in v2.1.0

type MemberParam = shared.MemberParam

This is an alias to an internal type.

type MemberRole added in v2.1.0

type MemberRole = shared.MemberRole

This is an alias to an internal type.

type MemberRoleParam added in v2.1.0

type MemberRoleParam = shared.MemberRoleParam

This is an alias to an internal type.

type MemberRolesPermissions added in v2.1.0

type MemberRolesPermissions = shared.MemberRolesPermissions

This is an alias to an internal type.

type MemberRolesPermissionsParam added in v2.1.0

type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

This is an alias to an internal type.

type MemberUser added in v2.1.0

type MemberUser = shared.MemberUser

This is an alias to an internal type.

type MemberUserParam added in v2.1.0

type MemberUserParam = shared.MemberUserParam

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.

Jump to

Keyboard shortcuts

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