JSON WORKS HERE TAG
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 9s
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 9s
This commit is contained in:
@@ -10,6 +10,10 @@ export interface RuleOut {
|
||||
|
||||
export interface ChainOut {
|
||||
name: string;
|
||||
type?: string | null;
|
||||
hook?: string | null;
|
||||
priority?: number | null;
|
||||
policy?: string | null;
|
||||
rules: RuleOut[];
|
||||
}
|
||||
|
||||
@@ -73,55 +77,3 @@ export interface ExecResult {
|
||||
/** Standard error from nft (may be null/undefined). */
|
||||
stderr?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request body for moving a rule.
|
||||
* Exactly one of position / before_handle / to_top / to_bottom is typically provided.
|
||||
*
|
||||
* Examples:
|
||||
* - Move to top: { family: "bridge", table: "filter", chain: "forward", to_top: true }
|
||||
* - Move before handle: { family: "inet", table: "filter", chain: "input", before_handle: 42 }
|
||||
* - Insert at position: { family: "ip", table: "filter", chain: "forward", position: 0 }
|
||||
*/
|
||||
export interface MoveRequest {
|
||||
/** Table family, e.g. "bridge", "inet", "ip", "ip6". */
|
||||
family: string;
|
||||
/** Table name, e.g. "filter". */
|
||||
table: string;
|
||||
/** Chain name, e.g. "forward". */
|
||||
chain: string;
|
||||
|
||||
/** Zero-based position to insert at (0 = top). Optional. */
|
||||
position?: number | null;
|
||||
|
||||
/** Insert before this existing handle in the same chain. Optional. */
|
||||
before_handle?: number | null;
|
||||
|
||||
/** Move to top (equivalent to position=0). Optional; default false on server. */
|
||||
to_top?: boolean;
|
||||
|
||||
/** Move to bottom (append). Optional; default false on server. */
|
||||
to_bottom?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sub-result for the move action (what was added / what was deleted).
|
||||
* Mirrors MoveSubResult(BaseModel).
|
||||
*/
|
||||
export interface MoveSubResult {
|
||||
/** Executed command as text (e.g. "add rule ..."). */
|
||||
cmd: string;
|
||||
/** Exec result if command was executed (may be null/undefined). */
|
||||
out?: ExecResult | null;
|
||||
/** Error string if the operation failed (may be null/undefined). */
|
||||
err?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overall move result: what was added and what was deleted.
|
||||
* Mirrors MoveResult(BaseModel).
|
||||
*/
|
||||
export interface MoveResult {
|
||||
added: MoveSubResult;
|
||||
deleted: MoveSubResult;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user