♻️ Move dealer to nexus
This commit is contained in:
@ -1,9 +0,0 @@
|
||||
package models
|
||||
|
||||
import "git.solsynth.dev/hydrogen/dealer/pkg/hyper"
|
||||
|
||||
type Account struct {
|
||||
hyper.BaseUser
|
||||
|
||||
Channels []Channel `json:"channels"`
|
||||
}
|
@ -23,7 +23,6 @@ type Channel struct {
|
||||
Messages []Event `json:"messages"`
|
||||
Calls []Call `json:"calls"`
|
||||
Type ChannelType `json:"type"`
|
||||
Account Account `json:"account"`
|
||||
AccountID uint `json:"account_id"`
|
||||
IsPublic bool `json:"is_public"`
|
||||
IsCommunity bool `json:"is_community"`
|
||||
@ -53,11 +52,13 @@ const (
|
||||
type ChannelMember struct {
|
||||
hyper.BaseModel
|
||||
|
||||
Name string `json:"name"`
|
||||
Nick string `json:"nick"`
|
||||
Avatar *string `json:"avatar"`
|
||||
|
||||
ChannelID uint `json:"channel_id"`
|
||||
AccountID uint `json:"account_id"`
|
||||
Nick *string `json:"nick"`
|
||||
Channel Channel `json:"channel"`
|
||||
Account Account `json:"account"`
|
||||
Notify NotifyLevel `json:"notify"`
|
||||
PowerLevel int `json:"power_level"`
|
||||
|
||||
|
@ -2,7 +2,7 @@ package models
|
||||
|
||||
import "git.solsynth.dev/hydrogen/dealer/pkg/hyper"
|
||||
|
||||
// Realm profiles basically fetched from Hydrogen.Passport
|
||||
// Realm profiles basically fetched from Hypernet.Passport
|
||||
// But cache at here for better usage and database relations
|
||||
type Realm struct {
|
||||
hyper.BaseRealm
|
||||
|
@ -1,21 +0,0 @@
|
||||
package models
|
||||
|
||||
import jsoniter "github.com/json-iterator/go"
|
||||
|
||||
type UnifiedCommand struct {
|
||||
Action string `json:"w"`
|
||||
Message string `json:"m"`
|
||||
Payload any `json:"p"`
|
||||
}
|
||||
|
||||
func UnifiedCommandFromError(err error) UnifiedCommand {
|
||||
return UnifiedCommand{
|
||||
Action: "error",
|
||||
Message: err.Error(),
|
||||
}
|
||||
}
|
||||
|
||||
func (v UnifiedCommand) Marshal() []byte {
|
||||
data, _ := jsoniter.Marshal(v)
|
||||
return data
|
||||
}
|
Reference in New Issue
Block a user