Documentation
¶
Overview ¶
Package api provides the HTTP client for communicating with the AgentSecrets API.
This package mirrors the Python SecretsCLI's api/client.py module. It handles all HTTP communication including authentication headers, endpoint resolution, and request/response handling.
Index ¶
Constants ¶
const DefaultBaseURL = "https://api.agentsecrets.theseventeen.co/api"
DefaultBaseURL is the SecretsCLI API endpoint
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
BaseURL string
HTTPClient *http.Client
// contains filtered or unexported fields
}
Client handles all HTTP communication with the AgentSecrets API server.
func (*Client) Call ¶
func (c *Client) Call(endpointKey, method string, data interface{}, urlParams map[string]string, queryParams map[string]string) (*http.Response, error)
Call makes an API request to the specified endpoint.
endpointKey uses dot notation like "auth.login" or "secrets.get". method is the HTTP method (GET, POST, PUT, DELETE). data is the request body (will be JSON-encoded), can be nil. urlParams are substituted into the endpoint path template. queryParams are added as ?key=value to the URL.