Documentation
¶
Index ¶
- func DefaultServer(ctx context.Context, keyPairs ...tls.Certificate) (*http.Server, error)
- func DefaultServerWithConfig(ctx context.Context, cfg *Config, keyPairs ...tls.Certificate) (*http.Server, error)
- func RegisterFlags(flagSet *pflag.FlagSet) error
- type Config
- type HTTPAPIClient
- type PostgresClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultServer ¶
DefaultServer returns a pointer to a http.Server with inserted tls keyPairs, or any error encountered.
If no keyPairs are provided, generates a self-signed keyPair and activates InsecureSkipVerify.
func DefaultServerWithConfig ¶ added in v0.8.0
func RegisterFlags ¶ added in v0.8.0
Types ¶
type Config ¶ added in v0.8.0
type Config struct {
Client struct{}
Server struct {
API struct {
BearerToken string
Host string
Port int
}
Bottin bottin.APIClientConfig
DB struct {
Database string
Host string
Password string
Port int
SSLMode string
User string
}
TLS struct {
// Cert is a TLS certificate, or path to a file containing one or more.
// Can be skipped if EnableAutoSelfSigned is true
Cert string
EnableAutoSelfSigned bool
// Key is a TLS private key, or path to a file containing one or more.
// Can be skipped if EnableAutoSelfSigned is true
Key string
}
UI struct {
BasicAuth struct {
Password string
User string
}
Host string
Port int
}
}
}
func NewConfigFromViper ¶ added in v0.8.0
type HTTPAPIClient ¶ added in v0.6.0
func NewHTTPAPIClient ¶ added in v0.6.0
func (HTTPAPIClient) ReadHelloWorld ¶ added in v0.6.0
func (c HTTPAPIClient) ReadHelloWorld() (code int, body []byte, err error)
type PostgresClient ¶ added in v0.7.0
Click to show internal directories.
Click to hide internal directories.