api

package
v0.0.0-...-0a3c54e Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RESPONSE_ERROR_KEY   = "error"
	RESPONSE_MESSAGE_KEY = "message"
)
View Source
const (
	DEFAULT_PORT = "8080"
)

Variables

This section is empty.

Functions

func JSONLogFormatter

func JSONLogFormatter(param gin.LogFormatterParams) string

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(ctx context.Context, apiKeys []string, dbClient *db.Client, logger *slog.Logger) (*Service, error)

func (*Service) AuthMiddleware

func (s *Service) AuthMiddleware() gin.HandlerFunc

func (*Service) Run

func (s *Service) Run(ctx context.Context, port string) error

Jump to

Keyboard shortcuts

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