{"modulePath":"github.com/aziontech/azion-cli","version":"v0.0.0-20261201162454-059d9f209f85","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package rules_engine\n\n## Variables\n\n```go\nvar ErrorBehaviorType = errors.New(\"behavior without a type valid for this phase\")\n```\nErrorBehaviorType is returned for a behavior whose type is missing or does not belong to the rule's phase.\n\n## Functions\n\n```go\nfunc ValidateBehaviors[T interface{ GetActualInstanceValue() interface{} }](behaviors []T) error\n```\nValidateBehaviors checks that every behavior was read as one of the phase's types. The SDK picks the type from the \"type\" field and, for a value it does not know (or none), leaves the behavior empty without an error; that empty behavior would then fail when the request is encoded.\n\n## Types\n\n```go\ntype Client struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewClient(c *http.Client, url string, token string) *Client\n```\n\n```go\nfunc (c *Client) CreateRequest(ctx context.Context, edgeApplicationID int64, req sdk.RequestPhaseRuleRequest) (RulesEngineResponse, error)\n```\n\n```go\nfunc (c *Client) CreateResponse(ctx context.Context, edgeApplicationID int64, req sdk.ResponsePhaseRuleRequest) (RulesEngineResponse, error)\n```\n\n```go\nfunc (c *Client) DeleteRequest(ctx context.Context, applicationID int64, ruleID int64) error\n```\n\n```go\nfunc (c *Client) DeleteResponse(ctx context.Context, edgeApplicationID int64, ruleID int64) error\n```\n\n```go\nfunc (c *Client) OrderRequest(ctx context.Context, applicationID int64, order []int64) error\n```\n\n```go\nfunc (c *Client) OrderResponse(ctx context.Context, applicationID int64, order []int64) error\n```\n\n```go\nfunc (c *Client) UpdateRequest(ctx context.Context, req *UpdateRulesEngineRequest) (RulesEngineResponse, error)\n```\n\n```go\nfunc (c *Client) UpdateResponse(ctx context.Context, req *UpdateRulesEngineResponse) (RulesEngineResponse, error)\n```\n\n```go\ntype CreateRulesEngineRequest struct {\n\tsdk.RequestPhaseRuleRequest\n}\n```\n\n```go\ntype CreateRulesEngineRequestV3 struct {\n\tsdkv3.CreateRulesEngineRequest\n}\n```\n\n```go\ntype CreateRulesEngineResponse struct {\n\tsdk.ResponsePhaseRuleRequest\n}\n```\n\n```go\ntype RulesEngineResponse interface {\n\tGetId() int64\n\tGetDescription() string\n\t// GetBehaviors() []sdk.EdgeApplicationBehaviorFieldRequest\n\t// GetCriteria() [][]sdk.EdgeApplicationCriterionFieldRequest\n\tGetActive() bool\n\tGetOrder() int64\n\tGetName() string\n}\n```\n\n```go\ntype UpdateRulesEngineRequest struct {\n\tsdk.PatchedRequestPhaseRule\n\tApplicationID int64\n\tRulesID       int64\n\tPhase         string\n}\n```\n\n```go\ntype UpdateRulesEngineResponse struct {\n\tsdk.PatchedResponsePhaseRuleRequest\n\tApplicationID int64\n\tRulesID       int64\n\tPhase         string\n}\n```\n\n","path":"github.com/aziontech/azion-cli/pkg/api/rules_engine","name":"rules_engine","synopsis":"","isRedistributable":true}
