Documentation
¶
Index ¶
- Variables
- func ApplyAuth(req *http.Request, kt KeyType, key string)
- func DefaultDir() string
- func DefaultPath() string
- func DeleteKey(profile string, kt KeyType) error
- func GetKey(profile string, kt KeyType) (string, error)
- func ManagementKey(id, secret string) string
- func SetKey(profile string, kt KeyType, value string) error
- func SetManagementKey(profile, id, secret string) error
- type Config
- type KeyType
- type MCPStore
- type Profile
Constants ¶
This section is empty.
Variables ¶
var ErrMCPTokenCorrupt = errors.New("stored MCP token is corrupt")
ErrMCPTokenCorrupt indicates a stored MCP token entry exists but could not be decoded. Callers treat this like a missing token: the entry is unusable, so re-authorizing is the only recovery.
Functions ¶
func DefaultDir ¶
func DefaultDir() string
func DefaultPath ¶
func DefaultPath() string
func ManagementKey ¶
ManagementKey encodes a management key's ID and secret into the single credential string the keyring stores and ApplyAuth sends as the bearer token. The id:secret wire format lives only here.
func SetManagementKey ¶
SetManagementKey stores a management key, encoding its ID and secret so callers never assemble the id:secret wire format themselves.
Types ¶
type Config ¶
type Config struct {
APIUrl string `json:"api_url,omitempty"`
MCPUrl string `json:"mcp_url,omitempty"`
ActiveProfile string `json:"active_profile,omitempty"`
Profiles map[string]*Profile `json:"profiles,omitempty"`
}
func (*Config) EnsureProfile ¶
type KeyType ¶
type KeyType string
func KeyTypes ¶
func KeyTypes() []KeyType
KeyTypes returns every key type, in storage order. Callers that act on all key types (logout, status, profile listing) range over this rather than hand-listing the constants, so adding a key type updates them all.
func ParseKeyType ¶
type MCPStore ¶
type MCPStore struct {
// contains filtered or unexported fields
}
MCPStore persists the OAuth credentials for the Honeycomb MCP server in the OS keyring, scoped to a profile. The token set and the Dynamic Client Registration client ID are OAuth artifacts, not raw Honeycomb credentials, so they live behind their own store rather than in the KeyType vault and stay out of the login/status/KeyTypes machinery.
func NewMCPStore ¶
NewMCPStore returns the OAuth credential store for a profile.
func (MCPStore) ClientID ¶
ClientID returns the stored OAuth client ID, or keyring.ErrNotFound when none has been registered.
func (MCPStore) DeleteClientID ¶
DeleteClientID removes the stored OAuth client ID.
func (MCPStore) DeleteToken ¶
DeleteToken removes the stored OAuth token set.
func (MCPStore) SetClientID ¶
SetClientID stores the DCR-registered OAuth client ID.