Documentation
¶
Index ¶
- Variables
- func InitializeWebServer(arg <-chan struct{}, config *Config, mySQLOptions *db.MySQLOptions, ...) (server.Server, error)
- func NewAuthenticator(jwtOpts *genericoptions.JWTOptions, redisOpts *genericoptions.RedisOptions) (authn.Authenticator, error)
- func NewMiddlewares(logger krtlog.Logger, authn authn.Authenticator, val validate.RequestValidator) []middleware.Middleware
- func NewWebServer(serverConfig *ServerConfig) (server.Server, error)
- func NewWhiteListMatcher() selector.MatchFunc
- func ProvideKratosAppConfig(registrar registry.Registrar) server.KratosAppConfig
- func ProvideKratosLogger() krtlog.Logger
- type Config
- type Server
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Name is the name of the compiled software. Name = "onex-usercenter" ID, _ = os.Hostname() Version = version.Get().String() )
Functions ¶
func InitializeWebServer ¶
func InitializeWebServer(arg <-chan struct{}, config *Config, mySQLOptions *db.MySQLOptions, jwtOptions *options.JWTOptions, redisOptions *options.RedisOptions, kafkaOptions *options.KafkaOptions) (server.Server, error)
func NewAuthenticator ¶
func NewAuthenticator(jwtOpts *genericoptions.JWTOptions, redisOpts *genericoptions.RedisOptions) (authn.Authenticator, error)
NewAuthenticator creates a new JWT-based Authenticator using the provided JWT and Redis options.
func NewMiddlewares ¶
func NewMiddlewares(logger krtlog.Logger, authn authn.Authenticator, val validate.RequestValidator) []middleware.Middleware
func NewWebServer ¶
func NewWebServer(serverConfig *ServerConfig) (server.Server, error)
NewWebServer creates and configures a new core web server.
func NewWhiteListMatcher ¶
func ProvideKratosAppConfig ¶
func ProvideKratosAppConfig(registrar registry.Registrar) server.KratosAppConfig
func ProvideKratosLogger ¶
Types ¶
type Config ¶
type Config struct { GRPCOptions *genericoptions.GRPCOptions HTTPOptions *genericoptions.HTTPOptions TLSOptions *genericoptions.TLSOptions JWTOptions *genericoptions.JWTOptions MySQLOptions *genericoptions.MySQLOptions RedisOptions *genericoptions.RedisOptions EtcdOptions *genericoptions.EtcdOptions KafkaOptions *genericoptions.KafkaOptions JaegerOptions *genericoptions.JaegerOptions ConsulOptions *genericoptions.ConsulOptions }
Config contains application-related configurations.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the web server.
type ServerConfig ¶
type ServerConfig struct {
// contains filtered or unexported fields
}
ServerConfig contains the core dependencies and configurations of the server.
func (*ServerConfig) NewGRPCServer ¶
func (c *ServerConfig) NewGRPCServer() *grpc.Server
NewGRPCServer creates and configures a new gRPC server instance.
func (*ServerConfig) NewHTTPServer ¶
func (c *ServerConfig) NewHTTPServer() *http.Server
NewHTTPServer creates and configures a new HTTP server instance.
Directories
¶
Path | Synopsis |
---|---|
Package biz is the place where you can implements more complex business logic.
|
Package biz is the place where you can implements more complex business logic. |
pkg
|
|
nolint: dupl
|
nolint: dupl |
Click to show internal directories.
Click to hide internal directories.