v1

package
v0.0.0-...-950e6cb Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const IngressHostIndex = "host"

Variables

This section is empty.

Functions

This section is empty.

Types

type DomainList

type DomainList []string

func (*DomainList) Set

func (s *DomainList) Set(value string) error

func (*DomainList) String

func (s *DomainList) String() string

type IcpResponse

type IcpResponse struct {
	ErrorCode int    `json:"error_code"`
	Reason    string `json:"reason"`
	Result    struct {
		CompanyName string `json:"CompanyName"`
		CompanyType string `json:"CompanyType"`
		MainPage    string `json:"MainPage"`
		SiteLicense string `json:"SiteLicense"`
		SiteName    string `json:"SiteName"`
		VerifyTime  string `json:"VerifyTime"`
	} `json:"result"`
}

type IcpValidator

type IcpValidator struct {
	// contains filtered or unexported fields
}

func NewIcpValidator

func NewIcpValidator(icpEnabled bool, icpEndpoint string, icpKey string) *IcpValidator

func (*IcpValidator) Query

func (i *IcpValidator) Query(rule *netv1.IngressRule) (*IcpResponse, error)

type IngressMutator

type IngressMutator struct {
	client.Client
	Domains            DomainList
	IngressAnnotations map[string]string
}

func (*IngressMutator) Default

func (m *IngressMutator) Default(_ context.Context, obj runtime.Object) error

func (*IngressMutator) SetupWithManager

func (m *IngressMutator) SetupWithManager(mgr ctrl.Manager) error

type IngressValidator

type IngressValidator struct {
	client.Client
	Domains DomainList

	IcpValidator *IcpValidator
	// contains filtered or unexported fields
}

func (*IngressValidator) SetupWithManager

func (v *IngressValidator) SetupWithManager(mgr ctrl.Manager) error

func (*IngressValidator) ValidateCreate

func (v *IngressValidator) ValidateCreate(ctx context.Context, obj runtime.Object) error

func (*IngressValidator) ValidateDelete

func (v *IngressValidator) ValidateDelete(_ context.Context, obj runtime.Object) error

func (*IngressValidator) ValidateUpdate

func (v *IngressValidator) ValidateUpdate(ctx context.Context, _, newObj runtime.Object) error

type NamespaceMutator

type NamespaceMutator struct {
	client.Client
}

func (*NamespaceMutator) Default

func (m *NamespaceMutator) Default(_ context.Context, obj runtime.Object) error

type NamespaceValidator

type NamespaceValidator struct {
	client.Client
}

func (*NamespaceValidator) ValidateCreate

func (v *NamespaceValidator) ValidateCreate(ctx context.Context, obj runtime.Object) error

func (*NamespaceValidator) ValidateDelete

func (v *NamespaceValidator) ValidateDelete(ctx context.Context, obj runtime.Object) error

func (*NamespaceValidator) ValidateUpdate

func (v *NamespaceValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) error

Jump to

Keyboard shortcuts

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