policycontext

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCatalogRequest

func BuildCatalogRequest(ctx Context, catalogID string, action policy.Action) policy.Request

BuildCatalogRequest creates a policy request for a catalog target.

func BuildRequest

func BuildRequest(
	ctx Context,
	serverName string,
	server catalog.Server,
	tool string,
	action policy.Action,
) policy.Request

BuildRequest creates a policy request from context, server, and action data.

func BuildWorkingSetRequest

func BuildWorkingSetRequest(ctx Context, workingSetID string, action policy.Action) policy.Request

BuildWorkingSetRequest creates a policy request for a working set target.

func InferServerEndpoint

func InferServerEndpoint(server catalog.Server) string

InferServerEndpoint returns the best endpoint for a remote server.

func InferServerSource

func InferServerSource(serverSourceType string, server catalog.Server) string

InferServerSource determines the policy server source identifier.

func InferServerSourceType

func InferServerSourceType(server catalog.Server) string

InferServerSourceType determines the policy server source type.

func InferServerTransportType

func InferServerTransportType(server catalog.Server) string

InferServerTransportType determines the policy transport type. The policy vocabulary uses stdio, sse, and streamable.

Types

type Context

type Context struct {
	// Catalog is the catalog identifier for the server.
	Catalog string
	// WorkingSet is the working set (profile) identifier for the request.
	WorkingSet string
	// ServerSourceTypeOverride forces the server source type if non-empty.
	ServerSourceTypeOverride string
}

Context carries policy request context values independent of server details.

Jump to

Keyboard shortcuts

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