admin

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: GPL-3.0 Imports: 35 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNotFound added in v1.8.3

func IsNotFound(err error) bool

func Start

func Start(ctx context.Context, config *Config, client discovery.SvcDiscoveryRegistry, server *grpc.Server) error

func ToDBAdminUpdate

func ToDBAdminUpdate(req *admin.AdminUpdateInfoReq) (map[string]any, error)

func ToDBAdminUpdatePassword

func ToDBAdminUpdatePassword(password string) (map[string]any, error)

func ToDBAppletUpdate

func ToDBAppletUpdate(req *admin.UpdateAppletReq) (map[string]any, error)

func ToDBInvitationRegisterUpdate

func ToDBInvitationRegisterUpdate(userID string) map[string]any

Types

type Admin

type Admin struct {
	Account    string    `gorm:"column:account;primary_key;type:char(64)"`
	Password   string    `gorm:"column:password;type:char(64)"`
	FaceURL    string    `gorm:"column:face_url;type:char(64)"`
	Nickname   string    `gorm:"column:nickname;type:char(64)"`
	UserID     string    `gorm:"column:user_id;type:char(64)"` // openIM userID
	Level      int32     `gorm:"column:level;default:1"  `
	CreateTime time.Time `gorm:"column:create_time"`
}

type Config

type Config struct {
	RpcConfig     config.Admin
	RedisConfig   config.Redis
	MongodbConfig config.Mongo
	Discovery     config.Discovery
	Share         config.Share

	RuntimeEnv string
}

Jump to

Keyboard shortcuts

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