general

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BunnyClientParams

type BunnyClientParams struct {
	APIKey string
}

type Client

type Client interface {
	ListPullZones(ctx context.Context, params ListPullZoneParams) (bunny.Page[PullZone], error)
}

func New

func New(params BunnyClientParams, options ...Option) Client

type EdgeRule

type EdgeRule struct {
	ID                  string
	ActionType          string
	ActionParameter1    string
	ActionParameter2    string
	Trigger             []EdgeRuleTrigger
	TriggerMatchingType int
	Description         string
	Enabled             bool
}

type EdgeRuleTrigger

type EdgeRuleTrigger struct {
	Type                int
	PatternMatches      []string
	PatternMatchingType int
	Parameter1          string
}

type ListPullZoneParams

type ListPullZoneParams struct {
	bunny.PageParams
	Search bunny.OptionalValue[string]
}

type Option

type Option = func(b *bunnyClient)

func WithHttpClient

func WithHttpClient(hc *http.Client) Option

type PullZone

type PullZone struct {
	ID                              string `json:"Id"`
	Name                            string
	OriginUrl                       string
	Enabled                         bool
	Hostnames                       []PullZoneHostname
	StorageZoneID                   int
	EdgeScriptID                    int
	AllowedReferrer                 []string
	BlockedReferrer                 []string
	BlockedIP                       []string
	EnabledGeoZoneUS                bool
	EnabledGeoZoneEU                bool
	EnabledGeoZoneAsia              bool
	EnabledGeoZoneSA                bool
	ZoneSecurityEnabled             bool
	ZoneSecurityKey                 string
	ZoneSecurityIncludeHashRemoteIP bool
	IgnoreQueryStrings              bool
	MonthlyBandwidthLimit           int
	MonthlyBandwidthUsed            int
}

type PullZoneHostname

type PullZoneHostname struct{}

Jump to

Keyboard shortcuts

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