server

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2023 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func InitializeRoute

func InitializeRoute(ctx context.Context, c config.Config) (*http.Server, func(), error)

func NewServer

func NewServer(c config.Config, route http.Handler) (*http.Server, func())

func NewSlog

func NewSlog(h slog.Handler) *slog.Logger

func ProvideCache

func ProvideCache(c config.Config) cache.Cache

func ProvideDB

func ProvideDB(c config.Config) (*sql.DB, func(), error)

func ProvideEnt

func ProvideEnt(ctx context.Context, db *sql.DB, c config.Config, sl *slog.Logger) (*ent.Client, func(), error)

func ProvideHttpClient

func ProvideHttpClient() *http.Client

func ProvidePriKey

func ProvidePriKey(c config.Config) (*rsa.PrivateKey, error)

func ProvidePubKey

func ProvidePubKey(pri *rsa.PrivateKey) *rsa.PublicKey

func ProvidePubKeyStr added in v0.0.3

func ProvidePubKeyStr(pri *rsa.PrivateKey) (yggdrasil.PubRsaKey, error)

func ProvideSlog

func ProvideSlog(c config.Config) slog.Handler

func ProvideValidate

func ProvideValidate() *validator.Validate

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL