describer

package
v0.1.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAPIToken

func GetAPIToken(ctx context.Context, handler *CloudFlareAPIHandler, resourceID string) (*models.Resource, error)

func GetAccessApplication

func GetAccessApplication(ctx context.Context, handler *CloudFlareAPIHandler, resourceID string) (*models.Resource, error)

func GetAccessGroup

func GetAccessGroup(ctx context.Context, handler *CloudFlareAPIHandler, resourceID string) (*models.Resource, error)

func GetAccessPolicy

func GetAccessPolicy(ctx context.Context, handler *CloudFlareAPIHandler, resourceID string) (*models.Resource, error)

func GetAccount

func GetAccount(ctx context.Context, handler *CloudFlareAPIHandler, resourceID string) (*models.Resource, error)

func GetAccountMember

func GetAccountMember(ctx context.Context, handler *CloudFlareAPIHandler, resourceID string) (*models.Resource, error)

func GetAccountRole

func GetAccountRole(ctx context.Context, handler *CloudFlareAPIHandler, resourceID string) (*models.Resource, error)

func GetDNSRecord

func GetDNSRecord(ctx context.Context, handler *CloudFlareAPIHandler, resourceID string) (*models.Resource, error)

func GetFireWallRule

func GetFireWallRule(ctx context.Context, handler *CloudFlareAPIHandler, resourceID string) (*models.Resource, error)

func GetLoadBalancer

func GetLoadBalancer(ctx context.Context, handler *CloudFlareAPIHandler, resourceID string) (*models.Resource, error)

func GetLoadBalancerMonitor

func GetLoadBalancerMonitor(ctx context.Context, handler *CloudFlareAPIHandler, resourceID string) (*models.Resource, error)

func GetLoadBalancerPool

func GetLoadBalancerPool(ctx context.Context, handler *CloudFlareAPIHandler, resourceID string) (*models.Resource, error)

func GetLoggerFromContext

func GetLoggerFromContext(ctx context.Context) *zap.Logger

func GetPageRule

func GetPageRule(ctx context.Context, handler *CloudFlareAPIHandler, resourceID string) (*models.Resource, error)

func GetParameterFromContext

func GetParameterFromContext(ctx context.Context, key string) any

func GetTriggerTypeFromContext

func GetTriggerTypeFromContext(ctx context.Context) enums.DescribeTriggerType

func GetUser

func GetUser(ctx context.Context, handler *CloudFlareAPIHandler, resourceID string) (*models.Resource, error)

func GetWorkerRoute

func GetWorkerRoute(ctx context.Context, handler *CloudFlareAPIHandler, resourceID string) (*models.Resource, error)

func GetZone

func GetZone(ctx context.Context, handler *CloudFlareAPIHandler, resourceID string) (*models.Resource, error)

func ListAPITokens

func ListAPITokens(ctx context.Context, handler *CloudFlareAPIHandler, stream *models.StreamSender) ([]models.Resource, error)

func ListAccessApplications

func ListAccessApplications(ctx context.Context, handler *CloudFlareAPIHandler, stream *models.StreamSender) ([]models.Resource, error)

func ListAccessGroups

func ListAccessGroups(ctx context.Context, handler *CloudFlareAPIHandler, stream *models.StreamSender) ([]models.Resource, error)

func ListAccessPolicies

func ListAccessPolicies(ctx context.Context, handler *CloudFlareAPIHandler, stream *models.StreamSender) ([]models.Resource, error)

func ListAccountMembers

func ListAccountMembers(ctx context.Context, handler *CloudFlareAPIHandler, stream *models.StreamSender) ([]models.Resource, error)

func ListAccountRoles

func ListAccountRoles(ctx context.Context, handler *CloudFlareAPIHandler, stream *models.StreamSender) ([]models.Resource, error)

func ListAccounts

func ListAccounts(ctx context.Context, handler *CloudFlareAPIHandler, stream *models.StreamSender) ([]models.Resource, error)

func ListDNSRecords

func ListDNSRecords(ctx context.Context, handler *CloudFlareAPIHandler, stream *models.StreamSender) ([]models.Resource, error)

func ListFireWallRules

func ListFireWallRules(ctx context.Context, handler *CloudFlareAPIHandler, stream *models.StreamSender) ([]models.Resource, error)

func ListLoadBalancerMonitors

func ListLoadBalancerMonitors(ctx context.Context, handler *CloudFlareAPIHandler, stream *models.StreamSender) ([]models.Resource, error)

func ListLoadBalancerPools

func ListLoadBalancerPools(ctx context.Context, handler *CloudFlareAPIHandler, stream *models.StreamSender) ([]models.Resource, error)

func ListLoadBalancers

func ListLoadBalancers(ctx context.Context, handler *CloudFlareAPIHandler, stream *models.StreamSender) ([]models.Resource, error)

func ListPageRules

func ListPageRules(ctx context.Context, handler *CloudFlareAPIHandler, stream *models.StreamSender) ([]models.Resource, error)

func ListUserAuditLogs

func ListUserAuditLogs(ctx context.Context, handler *CloudFlareAPIHandler, stream *models.StreamSender) ([]models.Resource, error)

func ListUsers

func ListUsers(ctx context.Context, handler *CloudFlareAPIHandler, stream *models.StreamSender) ([]models.Resource, error)

func ListWorkerRoutes

func ListWorkerRoutes(ctx context.Context, handler *CloudFlareAPIHandler, stream *models.StreamSender) ([]models.Resource, error)

func ListZones

func ListZones(ctx context.Context, handler *CloudFlareAPIHandler, stream *models.StreamSender) ([]models.Resource, error)

func WithLogger

func WithLogger(ctx context.Context, logger *zap.Logger) context.Context

Types

type CloudFlareAPIHandler

type CloudFlareAPIHandler struct {
	Conn         *cloudflare.API
	RateLimiter  *rate.Limiter
	Semaphore    chan struct{}
	MaxRetries   int
	RetryBackoff time.Duration
}

func NewCloudFlareAPIHandler

func NewCloudFlareAPIHandler(client *cloudflare.API, rateLimit rate.Limit, burst int, maxConcurrency int, maxRetries int, retryBackoff time.Duration) *CloudFlareAPIHandler

func (*CloudFlareAPIHandler) DoRequest

func (h *CloudFlareAPIHandler) DoRequest(ctx context.Context, requestFunc func() (*int, error)) error

DoRequest executes the Cloudflare API request with rate limiting, retries, and concurrency control.

type JSONAllFieldsMarshaller

type JSONAllFieldsMarshaller struct {
	Value interface{}
}

func (JSONAllFieldsMarshaller) MarshalJSON

func (x JSONAllFieldsMarshaller) MarshalJSON() (res []byte, err error)

func (*JSONAllFieldsMarshaller) UnmarshalJSON

func (x *JSONAllFieldsMarshaller) UnmarshalJSON(data []byte) (err error)

Jump to

Keyboard shortcuts

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