package service

import (
	"context"

	v1 "cris/api/chat/v1"
)

type IChat interface {
	Login(ctx context.Context, req *v1.ChatReq) (res *v1.ChatRes, err error)
}

var chat IChat

func Chat() IChat {
	if chat == nil {
		panic("login 接口未实现或注册")
	}
	return chat
}

func RegisterChat(c IChat) {
	chat = c
}
