Documentation
¶
Overview ¶
Package synqconfig provides shared SYNQ API credential configuration used by CLI tools (synq-dwh, synq-scout, synq-recon).
Index ¶
Constants ¶
const DefaultEndpoint = "developer.synq.io:443"
DefaultEndpoint is the default SYNQ API gRPC endpoint (EU).
const DefaultUsEndpoint = "api.us.synq.io:443"
DefaultUsEndpoint is the SYNQ API gRPC endpoint for the US region.
Variables ¶
This section is empty.
Functions ¶
func DeriveAppURL ¶
DeriveAppURL derives the SYNQ app URL from the gRPC endpoint. For "developer.synq.io:443" it returns "https://app.synq.io". For "api.us.synq.io:443" it returns "https://app.us.synq.io".
func DeriveOAuthURL ¶
DeriveOAuthURL derives the OAuth token URL from the gRPC endpoint. For "developer.synq.io:443" it returns "https://developer.synq.io/oauth2/token".
Types ¶
type SYNQConfig ¶
type SYNQConfig struct {
// OAuth client ID for authenticating with the SYNQ platform.
ClientID string `yaml:"client_id,omitempty" json:"client_id,omitempty"`
// OAuth client secret for authenticating with the SYNQ platform.
ClientSecret string `yaml:"client_secret,omitempty" json:"client_secret,omitempty"`
// gRPC endpoint for the SYNQ API (e.g. "developer.synq.io:443").
Endpoint string `yaml:"endpoint,omitempty" json:"endpoint,omitempty"`
// gRPC endpoint for the SYNQ ingest API. Defaults to Endpoint if empty.
IngestEndpoint string `yaml:"ingest_endpoint,omitempty" json:"ingest_endpoint,omitempty"`
// OAuth token URL. Derived from Endpoint if empty.
OAuthURL string `yaml:"oauth_url,omitempty" json:"oauth_url,omitempty"`
}
SYNQConfig holds SYNQ platform connection settings. It can be parsed from YAML and/or populated from environment variables.
func (*SYNQConfig) ApplyEnvDefaults ¶
func (c *SYNQConfig) ApplyEnvDefaults()
ApplyEnvDefaults fills empty fields from environment variables and defaults. Priority: existing value (from YAML) > env var > default.
func (*SYNQConfig) ToProto ¶
func (c *SYNQConfig) ToProto() *agentv1.SYNQ
ToProto converts the config to a proto SYNQ message.