 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package misc provides miscellaneous utility functions and embedded data for the CLI Proxy API. This package contains general-purpose helpers and embedded resources that do not fit into more specific domain packages. It includes embedded instructional text for Claude Code-related operations.
Package misc provides miscellaneous utility functions and embedded data for the CLI Proxy API. This package contains general-purpose helpers and embedded resources that do not fit into more specific domain packages. It includes embedded instructional text for Codex-related operations.
Package misc provides miscellaneous utility functions for the CLI Proxy API server. It includes helper functions for HTTP header manipulation and other common operations that don't fit into more specific packages.
Package misc provides miscellaneous utility functions and embedded data for the CLI Proxy API. This package contains general-purpose helpers and embedded resources that do not fit into more specific domain packages. It includes a comprehensive MIME type mapping for file operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ClaudeCodeInstructions string
    ClaudeCodeInstructions holds the content of the claude_code_instructions.txt file, which is embedded into the application binary at compile time. This variable contains specific instructions for Claude Code model interactions and code generation guidance.
var GPT5CodexInstructions string
    var GPT5Instructions string
    CodexInstructions holds the content of the codex_instructions.txt file, which is embedded into the application binary at compile time. This variable contains instructional text used for Codex-related operations and model guidance.
var MimeTypes = map[string]string{}/* 732 elements not displayed */
    MimeTypes is a comprehensive map of file extensions to their corresponding MIME types. This map is used to determine the Content-Type header for file uploads and other operations where the MIME type needs to be identified from a file extension. The list is extensive to cover a wide range of common and uncommon file formats.
Functions ¶
func CodexInstructions ¶
func EnsureHeader ¶
EnsureHeader ensures that a header exists in the target header map by checking multiple sources in order of priority: source headers, existing target headers, and finally the default value. It only sets the header if it's not already present and the value is not empty after trimming whitespace.
Parameters:
- target: The target header map to modify
- source: The source header map to check first (can be nil)
- key: The header key to ensure
- defaultValue: The default value to use if no other source provides a value
func GenerateRandomState ¶
GenerateRandomState generates a cryptographically secure random state parameter for OAuth2 flows to prevent CSRF attacks.
Returns:
- string: A hexadecimal encoded random state string
- error: An error if the random generation fails, nil otherwise
func LogCredentialSeparator ¶
func LogCredentialSeparator()
LogCredentialSeparator adds a visual separator to group auth/key processing logs.
func LogSavingCredentials ¶
func LogSavingCredentials(path string)
LogSavingCredentials emits a consistent log message when persisting auth material.
Types ¶
This section is empty.