core

package
v0.0.0-...-c157030 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Database

type Database struct {
	Type        string
	Host        string
	Port        int
	User        string
	Password    string
	Name        string
	DBFile      string
	TablePrefix string `mapstructure:"table_prefix"`
	SSLMode     string
	Migrate     bool
}

type FiberLogger

type FiberLogger struct {
	*StargazerLogger
}

func (FiberLogger) Write

func (l FiberLogger) Write(p []byte) (n int, err error)

Writer interface implementation for fiber-framework

type FxLogger

type FxLogger struct {
	*StargazerLogger
}

func (*FxLogger) LogEvent

func (l *FxLogger) LogEvent(event fxevent.Event)

func (FxLogger) Printf

func (l FxLogger) Printf(str string, args ...interface{})

Printf prints go-fx logs

type Logger

type Logger struct {
	LogLevel string `mapstructure:"log_level"`
	LogPath  string `mapstructure:"log_path"`
	LogName  string `mapstructure:"log_name"`
	LogExt   string `mapstructure:"log_ext"`
}

type Server

type Server struct {
	Host    string
	Port    string
	Debug   bool
	Prefork bool
	Secret  string
	TLS     struct {
		Enabled  bool   `mapstructure:"enabled"`
		CertFile string `mapstructure:"cert_file"`
		KeyFile  string `mapstructure:"key_file"`
	}
}

type StargazerConfig

type StargazerConfig struct {
	Server   Server
	Database Database
	Logger   Logger
}

func NewStargazerConfig

func NewStargazerConfig() StargazerConfig

type StargazerDB

type StargazerDB struct {
	*ent.Client
}

func NewStargazerDB

func NewStargazerDB(config StargazerConfig, logger StargazerLogger) StargazerDB

type StargazerLogger

type StargazerLogger struct {
	*zap.SugaredLogger
}

func NewStargazerLogger

func NewStargazerLogger() StargazerLogger

func (*StargazerLogger) GetFxLogger

func (l *StargazerLogger) GetFxLogger() fxevent.Logger

GetFxLogger gets logger for go-fx

type StargazerServer

type StargazerServer struct {
	App *fiber.App
	Api fiber.Router
}

func NewStargazerServer

func NewStargazerServer(config StargazerConfig, sl StargazerLogger) StargazerServer

Jump to

Keyboard shortcuts

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