authentication

package
v0.0.0-...-97dd610 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const RuleType = "authentication/v1beta1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Extend

type Extend struct {
	Key   string `json:"key,omitempty"`
	Value string `json:"value,omitempty"`
}

type Handler

type Handler interface {
	Add(key string, obj *Policy)
	Get(key string) *Policy
	Update(key string, newObj *Policy)
	Delete(key string)
}

type Impl

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

func NewHandler

func NewHandler(storage *connection.Storage) *Impl

func (*Impl) Add

func (i *Impl) Add(key string, obj *Policy)

func (*Impl) Delete

func (i *Impl) Delete(key string)

func (*Impl) Get

func (i *Impl) Get(key string) *Policy

func (*Impl) Notify

func (i *Impl) Notify()

func (*Impl) Update

func (i *Impl) Update(key string, newObj *Policy)

type Origin

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

func (*Origin) Exact

func (o *Origin) Exact(endpoint *rule.Endpoint) (rule.ToClient, error)

func (*Origin) Revision

func (o *Origin) Revision() int64

func (*Origin) Type

func (o *Origin) Type() string

type Policy

type Policy struct {
	Name string `json:"name,omitempty"`

	Spec *PolicySpec `json:"spec"`
}

func (*Policy) CopyToClient

func (p *Policy) CopyToClient() *PolicyToClient

type PolicySpec

type PolicySpec struct {
	Action    string       `json:"action"`
	Selector  []*Selector  `json:"selector,omitempty"`
	PortLevel []*PortLevel `json:"PortLevel,omitempty"`
}

func (*PolicySpec) CopyToClient

func (p *PolicySpec) CopyToClient() *PolicySpecToClient

type PolicySpecToClient

type PolicySpecToClient struct {
	Action    string               `json:"action"`
	PortLevel []*PortLevelToClient `json:"PortLevel,omitempty"`
}

type PolicyToClient

type PolicyToClient struct {
	Name string              `json:"name,omitempty"`
	Spec *PolicySpecToClient `json:"spec"`
}

type PortLevel

type PortLevel struct {
	Port   int    `json:"port,omitempty"`
	Action string `json:"action,omitempty"`
}

func (*PortLevel) CopyToClient

func (p *PortLevel) CopyToClient() *PortLevelToClient

type PortLevelToClient

type PortLevelToClient struct {
	Port   int    `json:"port,omitempty"`
	Action string `json:"action,omitempty"`
}

type Selector

type Selector struct {
	Namespaces    []string  `json:"namespaces,omitempty"`
	NotNamespaces []string  `json:"notNamespaces,omitempty"`
	IpBlocks      []string  `json:"ipBlocks,omitempty"`
	NotIpBlocks   []string  `json:"notIpBlocks,omitempty"`
	Principals    []string  `json:"principals,omitempty"`
	NotPrincipals []string  `json:"notPrincipals,omitempty"`
	Extends       []*Extend `json:"extends,omitempty"`
	NotExtends    []*Extend `json:"notExtends,omitempty"`
}

type ToClient

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

func (*ToClient) Data

func (r *ToClient) Data() string

func (*ToClient) Revision

func (r *ToClient) Revision() int64

func (*ToClient) Type

func (r *ToClient) Type() string

Jump to

Keyboard shortcuts

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