Documentation
¶
Index ¶
- Constants
- Variables
- func ConfigPath(opts DiscoveryOptions) (string, error)
- func IsMissingIntervalsCredentials(err error) bool
- func LoadDiscovered(opts DiscoveryOptions) (Config, Source, error)
- func LoadEffective(opts DiscoveryOptions) (Config, Source, error)
- func LoadIntervalsDiscovered(opts DiscoveryOptions) (Config, Source, error)
- func WriteIntervalsConfig(path string, creds IntervalsCredentials, overwrite bool) error
- type Config
- type DiscoveryOptions
- type IntervalsCredentials
- type Source
- type SourceKind
Constants ¶
View Source
const DefaultIntervalsBaseURL = defaultIntervalsBaseURL
Variables ¶
View Source
var ( ErrMissingAPIKey = errors.New("INTERVALS_ICU_API_KEY is required") ErrMissingAthleteID = errors.New("INTERVALS_ICU_ATHLETE_ID is required") )
ErrMissingAPIKey and ErrMissingAthleteID are returned (wrapped via errors.Join) by ValidateIntervals so callers can detect the first-run "no credentials yet" case with errors.Is instead of matching error text.
Functions ¶
func ConfigPath ¶
func ConfigPath(opts DiscoveryOptions) (string, error)
func LoadDiscovered ¶
func LoadDiscovered(opts DiscoveryOptions) (Config, Source, error)
func LoadEffective ¶
func LoadEffective(opts DiscoveryOptions) (Config, Source, error)
func LoadIntervalsDiscovered ¶
func LoadIntervalsDiscovered(opts DiscoveryOptions) (Config, Source, error)
func WriteIntervalsConfig ¶
func WriteIntervalsConfig(path string, creds IntervalsCredentials, overwrite bool) error
Types ¶
type Config ¶
type Config struct {
IntervalsAPIKey string
IntervalsAthleteID string
IntervalsBaseURL string
MCPAddr string
MCPPublicURL string
RequiredScopes []string
SupabaseURL string
SupabaseAnonKey string
SupabaseOAuthProviders []string
OIDCIssuerURL string
OIDCJWKSURL string
OIDCAudience string
OIDCAllowedEmail string
OIDCAllowedSub string
RequestTimeout time.Duration
ShutdownTimeout time.Duration
}
func (Config) MCPResource ¶
func (Config) ResourceMetadataURL ¶
func (Config) ValidateIntervals ¶
type DiscoveryOptions ¶
type IntervalsCredentials ¶
type Source ¶
type Source struct {
Kind SourceKind
Path string
Exists bool
}
func Discover ¶
func Discover(opts DiscoveryOptions) (Source, error)
type SourceKind ¶
type SourceKind string
const ( SourceNone SourceKind = "none" SourceExplicit SourceKind = "explicit" SourceXDG SourceKind = "xdg" SourceLocal SourceKind = "local" )
Click to show internal directories.
Click to hide internal directories.