admin

package
v0.0.0-...-73f8a9c Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAdmin

func AddAdmin(admin *OwlAdmin) (int64, error)

func DelAdmin

func DelAdmin(id int64) error

func IsAdmin

func IsAdmin(username string) (bool, error)

func SetAdminDao

func SetAdminDao(impl AdminDao)

Types

type AdminDao

type AdminDao interface {
	AddAdmin(admin *OwlAdmin) (int64, error)
	GetAdmin(username string) (*OwlAdmin, error)
	ListAdmin(pagination *tidb_or_mysql.Pagination) ([]OwlAdmin, int64, error)
	DelAdmin(id int64) error
}

type OwlAdmin

type OwlAdmin struct {
	ID          int64  `json:"id" gorm:"column:id"`
	Username    string `json:"username" gorm:"username"`
	Description string `json:"description" gorm:"column:description"`

	Ct      int64  `json:"ct" gorm:"column:ct"`
	Creator string `json:"creator" gorm:"creator"`
}

func ListAdmin

func ListAdmin(pagination *tidb_or_mysql.Pagination) ([]OwlAdmin, int64, error)

Jump to

Keyboard shortcuts

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