users methods

This commit is contained in:
royalcat 2024-12-25 21:22:29 +03:00
parent 6d84b8480f
commit 5da11dc01b
10 changed files with 564 additions and 55 deletions
src/proto

View file

@ -3,6 +3,7 @@ package proto
import (
channelv1 "github.com/royalcat/konfa-server/src/proto/konfa/channel/v1"
chatv1 "github.com/royalcat/konfa-server/src/proto/konfa/chat/v1"
userv1 "github.com/royalcat/konfa-server/src/proto/konfa/user/v1"
"github.com/royalcat/konfa-server/src/store"
"google.golang.org/protobuf/types/known/timestamppb"
)
@ -47,3 +48,10 @@ func mapVoiceChannel(c store.VoiceChannel) *channelv1.VoiceChannel {
Name: c.Name,
}
}
func mapUser(c store.User) *userv1.User {
return &userv1.User{
Id: c.ID.String(),
Username: c.Username,
}
}