Documentation
¶
Index ¶
- func NewValidatorUsingGoogle(ctx context.Context, cfg *Config, iamService *iam.Service) (*validatorUsingGoogle, error)
- type Access
- type AccessControlListElement
- type AccessTokenAuthenticator
- type ClientAuth
- type Config
- type GCEInstanceIdentityAuthenticator
- type GCEInstanceIdentityBinding
- type GCSStorage
- type GitHubApp
- type GitHubInstance
- type HTTPProxy
- type HTTPProxyInfo
- type Identity
- type Loader
- type ParentProxy
- type PrivateModulesElement
- type PrivateModulesElementAuth
- type PublicModules
- type Regexp
- type Secret
- type Storage
- type SumDatabaseElement
- type SumDatabaseProxy
- type TLS
- type TLSVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientAuth ¶
type ClientAuth struct {
AccessControlList []*AccessControlListElement `yaml:"acl"`
Authenticators *struct {
AccessToken *AccessTokenAuthenticator `yaml:"accessToken"`
GCEInstanceIdentity *GCEInstanceIdentityAuthenticator `yaml:"gceInstanceIdentity"`
} `yaml:"authenticators"`
Enabled bool `yaml:"enabled"`
Identities []*Identity `yaml:"identities"`
}
type Config ¶
type Config struct {
ClientAuth ClientAuth `yaml:"clientAuth"`
GitHub []*GitHubInstance `yaml:"gitHub"`
HTTPProxy *HTTPProxy `yaml:"httpProxy"`
MaxChildProcesses int `yaml:"maxChildProcesses"`
ParentProxy ParentProxy `yaml:"parentProxy"`
PrivateModules []*PrivateModulesElement `yaml:"privateModules"`
PublicModules PublicModules `yaml:"publicModules"`
Storage *Storage `yaml:"storage"`
SumDatabaseProxy *SumDatabaseProxy `yaml:"sumDatabaseProxy"`
TLS *TLS `yaml:"tls"`
}
func LoadFromYAMLFile ¶
LoadFromYAMLFile loads configuration from a YAML file.
type GCEInstanceIdentityAuthenticator ¶
type GCEInstanceIdentityAuthenticator struct {
Audience string `yaml:"audience"`
}
type GCEInstanceIdentityBinding ¶
type GCEInstanceIdentityBinding struct {
Email string `yaml:"email"`
}
type GCSStorage ¶
type GCSStorage struct {
Bucket string `yaml:"bucket"`
}
type GitHubApp ¶
type GitHubApp struct {
ID int64 `yaml:"id"`
PrivateKey *Secret `yaml:"privateKey"`
PrivateKeyParsed *rsa.PrivateKey `yaml:"-"`
}
type GitHubInstance ¶
type HTTPProxyInfo ¶
type HTTPProxyInfo struct {
ProxyFunc func(*url.URL) (*url.URL, error)
LibcurlHTTPSProxy string
LibcurlNoProxy string
}
func GetHTTPProxyInfoAndUnsetEnviron ¶
func GetHTTPProxyInfoAndUnsetEnviron(cfg *Config) (*HTTPProxyInfo, error)
type Identity ¶
type Identity struct {
Name string `yaml:"name"`
GCEInstanceIdentityBinding *GCEInstanceIdentityBinding `yaml:"gceInstanceIdentityBinding"`
Password *Secret `yaml:"password"`
}
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader is a helper type to split up configuration loading into multiple functions.
type ParentProxy ¶
type PrivateModulesElement ¶
type PrivateModulesElement struct {
Auth PrivateModulesElementAuth `yaml:"auth"`
PathPrefix string `yaml:"pathPrefix"`
PathPrefixHost string `yaml:"-"`
// contains filtered or unexported fields
}
type PrivateModulesElementAuth ¶
type PrivateModulesElementAuth struct {
GitHubApp *int64 `yaml:"gitHubApp"`
}
type PublicModules ¶
type PublicModules struct {
SumDatabase *SumDatabaseElement `yaml:"sumDatabase"`
}
type Storage ¶
type Storage struct {
GCS *GCSStorage `yaml:"gcs"`
}
type SumDatabaseElement ¶
type SumDatabaseElement struct {
Name string `yaml:"name"`
PublicKey string `yaml:"publicKey"`
URL string `yaml:"url"`
URLParsed *url.URL `yaml:"-"`
// contains filtered or unexported fields
}
func (*SumDatabaseElement) FormatGoSumDBEnvVar ¶
func (s *SumDatabaseElement) FormatGoSumDBEnvVar() string
FormatGoSumDBEnvVar represents s as the value of a GOSUMDB environment variable as defined by the Go toolchain.
type SumDatabaseProxy ¶
type SumDatabaseProxy struct {
DiscourageClientDirectSumDatabaseConnections bool `yaml:"discourageClientDirectSumDatabaseConnections"`
SumDatabases []*SumDatabaseElement `yaml:"sumDatabases"`
}
type TLS ¶
type TLS struct {
MinVersion TLSVersion `yaml:"minVersion"`
}
type TLSVersion ¶
type TLSVersion uint16
func (*TLSVersion) UnmarshalYAML ¶
func (t *TLSVersion) UnmarshalYAML(unmarshal func(any) error) error
Click to show internal directories.
Click to hide internal directories.