handler

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler

func NewHandler

func NewHandler(appConfig *config.AppConfig, notificationSender notification.NotificationSender, version, buildDate, buildNumber string) *Handler

func (*Handler) HealthCheckHandler added in v1.0.0

func (h *Handler) HealthCheckHandler(c echo.Context) error

HealthCheckHandler godoc @Summary 서버 상태 확인 @Description 서버가 정상적으로 동작하는지 확인합니다. @Description @Description 이 엔드포인트는 인증 없이 호출할 수 있으며, 모니터링 시스템에서 서버 상태를 확인하는 데 사용됩니다. @Tags System @Produce json @Success 200 {object} model.HealthResponse "서버 정상" @Failure 500 {object} model.ErrorResponse "서버 내부 오류" @Router /health [get]

func (*Handler) NotifyMessageSendHandler

func (h *Handler) NotifyMessageSendHandler(c echo.Context) error

NotifyMessageSendHandler godoc @Summary 알림 메시지 전송 @Description 외부 애플리케이션에서 텔레그램 등의 메신저로 알림 메시지를 전송합니다. @Description @Description 이 API를 사용하려면 사전에 등록된 애플리케이션 ID와 App Key가 필요합니다. @Description 설정 파일(notify-server.json)의 notify_api.applications에 애플리케이션을 등록해야 합니다. @Description @Description ## 사용 예시 (로컬 환경) @Description ```bash @Description curl -X POST "http://localhost:2443/api/v1/notice/message?app_key=your-app-key" \ @Description -H "Content-Type: application/json" \ @Description -d '{"application_id":"my-app","message":"테스트 메시지","error_occurred":false}' @Description ``` @Tags Notification @Accept json @Produce json @Param app_key query string true "Application Key (인증용)" example(your-app-key-here) @Param message body model.NotifyMessage true "알림 메시지 정보" @Success 200 {object} model.SuccessResponse "성공" @Failure 400 {object} model.ErrorResponse "잘못된 요청 (필수 필드 누락, JSON 형식 오류 등)" @Failure 401 {object} model.ErrorResponse "인증 실패 (잘못된 App Key 또는 미등록 애플리케이션)" @Failure 500 {object} model.ErrorResponse "서버 내부 오류" @Security ApiKeyAuth @Router /api/v1/notice/message [post]

func (*Handler) VersionHandler added in v1.0.0

func (h *Handler) VersionHandler(c echo.Context) error

VersionHandler godoc @Summary 서버 버전 정보 @Description 서버의 빌드 정보를 반환합니다. @Description @Description Git 커밋 해시, 빌드 날짜, 빌드 번호, Go 버전 등의 정보를 제공합니다. @Description 이 정보는 디버깅 및 버전 확인에 유용합니다. @Tags System @Produce json @Success 200 {object} model.VersionResponse "버전 정보" @Failure 500 {object} model.ErrorResponse "서버 내부 오류" @Router /version [get]

Jump to

Keyboard shortcuts

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