policy

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateInput

type CreateInput struct {
	GatewayID   ids.GatewayID
	Name        string
	Description string
	Slug        string
	Enabled     bool
	Priority    int
	Parallel    bool
	Settings    map[string]any
	Stages      []domain.Stage
	Mode        domain.Mode
}

type Creator

type Creator interface {
	Create(ctx context.Context, in CreateInput) (*domain.Policy, error)
}

func NewCreator

func NewCreator(
	repo domain.Repository,
	registry appplugins.Registry,
	manager *cache.TTLMapManager,
	logger *slog.Logger,
) Creator

type Deleter

type Deleter interface {
	Delete(ctx context.Context, gatewayID ids.GatewayID, id ids.PolicyID) error
}

func NewDeleter

func NewDeleter(
	repo domain.Repository,
	manager *cache.TTLMapManager,
	publisher cache.EventPublisher,
	logger *slog.Logger,
) Deleter

type Duplicator

type Duplicator interface {
	Duplicate(ctx context.Context, gatewayID ids.GatewayID, id ids.PolicyID) (*domain.Policy, error)
}

func NewDuplicator

func NewDuplicator(finder Finder, creator Creator, logger *slog.Logger) Duplicator

type Finder

type Finder interface {
	FindByID(ctx context.Context, gatewayID ids.GatewayID, id ids.PolicyID) (*domain.Policy, error)
	List(ctx context.Context, filter domain.ListFilter) ([]*domain.Policy, int, error)
}

func NewFinder

func NewFinder(repo domain.Repository, manager *cache.TTLMapManager, logger *slog.Logger) Finder

type Scoper

type Scoper interface {
	SetGlobal(ctx context.Context, gatewayID ids.GatewayID, id ids.PolicyID) (*domain.Policy, error)
	UnsetGlobal(ctx context.Context, gatewayID ids.GatewayID, id ids.PolicyID) (*domain.Policy, error)
}

func NewScoper

func NewScoper(
	repo domain.Repository,
	manager *cache.TTLMapManager,
	publisher cache.EventPublisher,
	logger *slog.Logger,
) Scoper

type UpdateInput

type UpdateInput struct {
	ID          ids.PolicyID
	GatewayID   ids.GatewayID
	Name        *string
	Description *string
	Slug        *string
	Enabled     *bool
	Priority    *int
	Parallel    *bool
	Settings    *map[string]any
	Stages      *[]domain.Stage
	Mode        *domain.Mode
}

type Updater

type Updater interface {
	Update(ctx context.Context, in UpdateInput) (*domain.Policy, error)
}

func NewUpdater

func NewUpdater(
	repo domain.Repository,
	registry appplugins.Registry,
	manager *cache.TTLMapManager,
	publisher cache.EventPublisher,
	logger *slog.Logger,
) Updater

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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