dal

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPolicyCircuitBreakDB

func GetPolicyCircuitBreakDB(ctx context.Context, defDB *gorm.DB) *gorm.DB

Get policy circuit break storage instance (only active records)

func GetPolicyInvocationDB

func GetPolicyInvocationDB(ctx context.Context, defDB *gorm.DB) *gorm.DB

Get policy invocation storage instance (only active records)

func GetPolicyLimitDB

func GetPolicyLimitDB(ctx context.Context, defDB *gorm.DB) *gorm.DB

Get policy limit storage instance (only active records)

func GetPolicyLoadbalanceDB

func GetPolicyLoadbalanceDB(ctx context.Context, defDB *gorm.DB) *gorm.DB

Get policy loadbalance storage instance (only active records)

func GetPolicyRouteDB

func GetPolicyRouteDB(ctx context.Context, defDB *gorm.DB) *gorm.DB

Get policy route storage instance (only active records)

func GetPolicyRouteDetailDB

func GetPolicyRouteDetailDB(ctx context.Context, defDB *gorm.DB) *gorm.DB

Get policy route detail storage instance (only active records)

func GetPolicyTaggingDB

func GetPolicyTaggingDB(ctx context.Context, defDB *gorm.DB) *gorm.DB

Get policy tagging storage instance (only active records)

Types

type PolicyCircuitBreak

type PolicyCircuitBreak struct {
	DB *gorm.DB
}

Circuit break policy management

func (*PolicyCircuitBreak) Create

Create a new policy circuit break.

func (*PolicyCircuitBreak) Delete

func (a *PolicyCircuitBreak) Delete(ctx context.Context, id string) error

Delete the specified policy circuit break from the database using logical deletion.

func (*PolicyCircuitBreak) Exists

func (a *PolicyCircuitBreak) Exists(ctx context.Context, id string) (bool, error)

Exists checks if the specified policy circuit break exists in the database.

func (*PolicyCircuitBreak) ExistsByUniqueKey

func (a *PolicyCircuitBreak) ExistsByUniqueKey(ctx context.Context, scopeType, scopeCode, modelID, name string) (bool, error)

ExistsByUniqueKey checks whether a policy circuit break with the given unique key already exists.

func (*PolicyCircuitBreak) Get

Get the specified policy circuit break from the database.

func (*PolicyCircuitBreak) Query

Query policy circuit breaks from the database based on the provided parameters and options.

func (*PolicyCircuitBreak) Update

Update the specified policy circuit break in the database.

func (*PolicyCircuitBreak) UpdateEnabled

func (a *PolicyCircuitBreak) UpdateEnabled(ctx context.Context, id string, enabled int, modifier string) error

UpdateEnabled updates only the enabled status (and modifier) of the specified policy.

type PolicyInvocation

type PolicyInvocation struct {
	DB *gorm.DB
}

Invocation policy management

func (*PolicyInvocation) Create

Create a new policy invocation.

func (*PolicyInvocation) Delete

func (a *PolicyInvocation) Delete(ctx context.Context, id string) error

Delete the specified policy invocation from the database using logical deletion.

func (*PolicyInvocation) Exists

func (a *PolicyInvocation) Exists(ctx context.Context, id string) (bool, error)

Exists checks if the specified policy invocation exists in the database.

func (*PolicyInvocation) ExistsByUniqueKey

func (a *PolicyInvocation) ExistsByUniqueKey(ctx context.Context, scopeType, scopeCode, modelID, name string) (bool, error)

ExistsByUniqueKey checks whether a policy invocation with the given unique key already exists.

func (*PolicyInvocation) Get

Get the specified policy invocation from the database.

func (*PolicyInvocation) Query

Query policy invocations from the database based on the provided parameters and options.

func (*PolicyInvocation) Update

Update the specified policy invocation in the database.

func (*PolicyInvocation) UpdateEnabled

func (a *PolicyInvocation) UpdateEnabled(ctx context.Context, id string, enabled int, modifier string) error

UpdateEnabled updates only the enabled status (and modifier) of the specified policy.

type PolicyLimit

type PolicyLimit struct {
	DB *gorm.DB
}

Limit policy management

func (*PolicyLimit) Create

func (a *PolicyLimit) Create(ctx context.Context, item *schema.PolicyLimit) error

Create a new policy limit.

func (*PolicyLimit) Delete

func (a *PolicyLimit) Delete(ctx context.Context, id string) error

Delete the specified policy limit from the database using logical deletion.

func (*PolicyLimit) Exists

func (a *PolicyLimit) Exists(ctx context.Context, id string) (bool, error)

Exists checks if the specified policy limit exists in the database.

func (*PolicyLimit) ExistsByUniqueKey

func (a *PolicyLimit) ExistsByUniqueKey(ctx context.Context, scopeType, scopeCode, modelID, name string) (bool, error)

ExistsByUniqueKey checks whether a policy limit with the given unique key already exists.

func (*PolicyLimit) Get

Get the specified policy limit from the database.

func (*PolicyLimit) Query

Query policy limits from the database based on the provided parameters and options.

func (*PolicyLimit) Update

func (a *PolicyLimit) Update(ctx context.Context, item *schema.PolicyLimit) error

Update the specified policy limit in the database.

func (*PolicyLimit) UpdateEnabled

func (a *PolicyLimit) UpdateEnabled(ctx context.Context, id string, enabled int, modifier string) error

UpdateEnabled updates only the enabled status (and modifier) of the specified policy.

type PolicyLoadbalance

type PolicyLoadbalance struct {
	DB *gorm.DB
}

Loadbalance policy management

func (*PolicyLoadbalance) Create

Create a new policy loadbalance.

func (*PolicyLoadbalance) Delete

func (a *PolicyLoadbalance) Delete(ctx context.Context, id string) error

Delete the specified policy loadbalance from the database using logical deletion.

func (*PolicyLoadbalance) Exists

func (a *PolicyLoadbalance) Exists(ctx context.Context, id string) (bool, error)

Exists checks if the specified policy loadbalance exists in the database.

func (*PolicyLoadbalance) ExistsByName

func (a *PolicyLoadbalance) ExistsByName(ctx context.Context, scopeType, scopeCode, modelID, name string) (bool, error)

ExistsByName checks whether a policy loadbalance with the given scope and name already exists.

func (*PolicyLoadbalance) Get

Get the specified policy loadbalance from the database.

func (*PolicyLoadbalance) Query

Query policy loadbalances from the database based on the provided parameters and options.

func (*PolicyLoadbalance) Update

Update the specified policy loadbalance in the database.

func (*PolicyLoadbalance) UpdateEnabled

func (a *PolicyLoadbalance) UpdateEnabled(ctx context.Context, id string, enabled int, modifier string) error

UpdateEnabled updates only the enabled status (and modifier) of the specified policy.

type PolicyRoute

type PolicyRoute struct {
	DB *gorm.DB
}

Route policy management

func (*PolicyRoute) Create

func (a *PolicyRoute) Create(ctx context.Context, item *schema.PolicyRoute) error

Create a new policy route.

func (*PolicyRoute) Delete

func (a *PolicyRoute) Delete(ctx context.Context, id string) error

Delete the specified policy route from the database using logical deletion.

func (*PolicyRoute) Exists

func (a *PolicyRoute) Exists(ctx context.Context, id string) (bool, error)

Exists checks if the specified policy route exists in the database.

func (*PolicyRoute) ExistsByUniqueKey

func (a *PolicyRoute) ExistsByUniqueKey(ctx context.Context, scopeType, scopeCode, modelID, name string) (bool, error)

ExistsByUniqueKey checks whether a policy route with the given unique key already exists.

func (*PolicyRoute) Get

Get the specified policy route from the database.

func (*PolicyRoute) Query

Query policy routes from the database based on the provided parameters and options.

func (*PolicyRoute) Update

func (a *PolicyRoute) Update(ctx context.Context, item *schema.PolicyRoute) error

Update the specified policy route in the database.

func (*PolicyRoute) UpdateEnabled

func (a *PolicyRoute) UpdateEnabled(ctx context.Context, id string, enabled int, modifier string) error

UpdateEnabled updates only the enabled status (and modifier) of the specified policy.

type PolicyRouteDetail

type PolicyRouteDetail struct {
	DB *gorm.DB
}

Route policy detail management

func (*PolicyRouteDetail) Create

Create a new policy route detail.

func (*PolicyRouteDetail) Delete

func (a *PolicyRouteDetail) Delete(ctx context.Context, id string) error

Delete the specified policy route detail from the database using logical deletion.

func (*PolicyRouteDetail) Exists

func (a *PolicyRouteDetail) Exists(ctx context.Context, id string) (bool, error)

Exists checks if the specified policy route detail exists in the database.

func (*PolicyRouteDetail) Get

Get the specified policy route detail from the database.

func (*PolicyRouteDetail) Query

Query policy route details from the database based on the provided parameters and options.

func (*PolicyRouteDetail) Update

Update the specified policy route detail in the database.

type PolicyTagging

type PolicyTagging struct {
	DB *gorm.DB
}

Tagging policy management

func (*PolicyTagging) Create

func (a *PolicyTagging) Create(ctx context.Context, item *schema.PolicyTagging) error

Create a new policy tagging.

func (*PolicyTagging) Delete

func (a *PolicyTagging) Delete(ctx context.Context, id string) error

Delete the specified policy tagging from the database using logical deletion.

func (*PolicyTagging) Exists

func (a *PolicyTagging) Exists(ctx context.Context, id string) (bool, error)

Exists checks if the specified policy tagging exists in the database.

func (*PolicyTagging) ExistsByName

func (a *PolicyTagging) ExistsByName(ctx context.Context, scopeType, scopeCode, modelID, name string) (bool, error)

ExistsByName checks whether a policy tagging with the given name already exists.

func (*PolicyTagging) Get

Get the specified policy tagging from the database.

func (*PolicyTagging) Query

Query policy taggings from the database based on the provided parameters and options.

func (*PolicyTagging) Update

func (a *PolicyTagging) Update(ctx context.Context, item *schema.PolicyTagging) error

Update the specified policy tagging in the database.

func (*PolicyTagging) UpdateEnabled

func (a *PolicyTagging) UpdateEnabled(ctx context.Context, id string, enabled int, modifier string) error

UpdateEnabled updates only the enabled status (and modifier) of the specified policy.

Jump to

Keyboard shortcuts

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