core

package
v0.0.0-...-6b983b4 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Error   string `json:"error,omitempty"` // 에러 상세 정보
}

type APIResponse

type APIResponse struct {
	Status  string      `json:"status"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"` // 성공 시 반환되는 데이터
}

type Notification

type Notification struct {
	ID       string   `json:"id"`       // 알림 ID -> TODO: 사용할 것인가?
	Tokens   []string `json:"tokens"`   // 디바이스 토큰 배열
	Platform int      `json:"platform"` // 1 = iOS, 2 = Android
	Title    string   `json:"title"`
	Message  string   `json:"message"`
	Status   string   `json:"status"` // 알림 상태 (pending, sent, failed)
}

Notification은 푸시 알림의 데이터 구조를 정의합니다.

func (*Notification) SendDirect

func (n *Notification) SendDirect() error

TODO: send 하는거 service폴더 만들어서 거기로 넘겨야함 방식 1: 직접 토큰과 플랫폼을 지정하여 푸시 알림을 전송 (sendDirect)

type SubscriptionRequest

type SubscriptionRequest struct {
	Token    string `json:"token"`    // 디바이스 토큰
	Topic    string `json:"topic"`    // 구독할 주제
	Platform int    `json:"platform"` // 플랫폼 정보 (예: 1 = iOS, 2 = Android)
}

SubscriptionRequest는 사용자의 구독 요청을 나타냅니다.

Jump to

Keyboard shortcuts

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