Documentation
¶
Index ¶
- func GetHooksConfig(ctx context.Context, client *volcengine.Client, workspaceID, branchID string) (map[string]interface{}, error)
- func RunVolcengineGet(ctx context.Context, client *volcengine.Client, workspaceID, branchID string, ...) error
- func RunVolcengineSet(ctx context.Context, client *volcengine.Client, workspaceID, branchID string, ...) error
- func SetHooksConfig(ctx context.Context, client *volcengine.Client, workspaceID, branchID string, ...) (map[string]interface{}, error)
- func ValidateHooksPatch(patch, current map[string]interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHooksConfig ¶
func GetHooksConfig(ctx context.Context, client *volcengine.Client, workspaceID, branchID string) (map[string]interface{}, error)
GetHooksConfig fetches Hooks config via the Auth Admin API.
func RunVolcengineGet ¶
func RunVolcengineGet(ctx context.Context, client *volcengine.Client, workspaceID, branchID string, keys []string) error
RunVolcengineGet retrieves Auth Hooks config and outputs to stdout.
func RunVolcengineSet ¶
func RunVolcengineSet(ctx context.Context, client *volcengine.Client, workspaceID, branchID string, pairs []string, fromJSON string, fsys afero.Fs) error
RunVolcengineSet modifies Auth Hooks config.
func SetHooksConfig ¶
func SetHooksConfig(ctx context.Context, client *volcengine.Client, workspaceID, branchID string, patch map[string]interface{}) (map[string]interface{}, error)
SetHooksConfig applies patch to the Auth Hooks config and returns the resulting values for the patched keys. The patch is validated against the current remote config first: unknown keys, mismatched value types, and inconsistent hook states (enabled without a URI, HTTP(S) URI without secrets) are rejected before anything is written, because the backend accepts such patches silently and the resulting state breaks both the hook at runtime and the console hooks page. Data-layer helper shared by the CLI (RunVolcengineSet) and the MCP server.
func ValidateHooksPatch ¶ added in v0.1.21
ValidateHooksPatch rejects patches the backend would accept but that leave the hooks config broken: unknown keys (silently ignored server-side), values whose JSON type differs from the current config, and per-hook states that can never work (enabled without a URI, an unsupported URI scheme, or an HTTP(S) hook without signing secrets). current is the full remote hooks config the patch is merged onto.
Types ¶
This section is empty.