Documentation
¶
Index ¶
- func Start(options ...Option)
- type App
- type Config
- type Implementation
- type Option
- func WithConfig(cfg *Config) Option
- func WithDatabase(db *pgx.Conn) Option
- func WithGrpcServer(srv *grpc.Server) Option
- func WithGrpcServerOptions(options ...grpc.ServerOption) Option
- func WithHTTP() Option
- func WithHttpServer(srv *http.Server) Option
- func WithLogger(log *zap.Logger) Option
- func WithServiceImplementation(desc *grpc.ServiceDesc, impl Implementation) Option
- type Tools
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶ added in v0.0.3
type Config struct { DatabaseDSN string `env:"DATABASE_DSN"` LogLevel string `env:"LOG_LEVEL" envDefault:"info"` GrpcListenPort int `env:"GRPC_LISTEN_PORT" envDefault:"9000"` HttpListenPort int `env:"HTTP_LISTEN_PORT" envDefault:"8080"` TLSCertificate string `env:"TLS_CERTIFICATE"` TLSKey string `env:"TLS_KEY"` }
Config of the application.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option interface.
func WithConfig ¶ added in v0.0.3
func WithDatabase ¶
func WithDatabase(db *pgx.Conn) Option
func WithGrpcServer ¶ added in v0.0.3
func WithGrpcServerOptions ¶
func WithGrpcServerOptions(options ...grpc.ServerOption) Option
func WithHttpServer ¶ added in v0.0.3
func WithLogger ¶
func WithServiceImplementation ¶
func WithServiceImplementation(desc *grpc.ServiceDesc, impl Implementation) Option
Click to show internal directories.
Click to hide internal directories.