storage

package
v0.0.0-...-2a611ce Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GormAutoMigrate

func GormAutoMigrate(db gorm.DB) error

func Init

func Init()

Types

type DBMS

type DBMS struct {
	// contains filtered or unexported fields
}
var DB DBMS

func GormConnect

func GormConnect(dsn string) (DBMS, error)

func (*DBMS) CodingNameExist

func (d *DBMS) CodingNameExist(ctx context.Context, input string) error

func (*DBMS) DeleteCoding

func (d *DBMS) DeleteCoding(ctx context.Context, CodingID uint) error

func (*DBMS) DeleteMenu

func (d *DBMS) DeleteMenu(ctx context.Context, MenuID uint) error

func (*DBMS) DeleteUser

func (d *DBMS) DeleteUser(ctx context.Context, UserID uint) error

func (*DBMS) EditCoding

func (d *DBMS) EditCoding(ctx context.Context, newCoding entitycoding.Coding) (entitycoding.Coding, error)

func (*DBMS) EditMenu

func (d *DBMS) EditMenu(ctx context.Context, newMenu entitymenu.Menu) (entitymenu.Menu, error)

func (*DBMS) EditUser

func (d *DBMS) EditUser(ctx context.Context, newUser entityUser.User) (entityUser.User, error)

func (*DBMS) FindCoding

func (d *DBMS) FindCoding(ctx context.Context, CodingID uint) (entitycoding.Coding, error)

func (*DBMS) FindCodingByCodingName

func (d *DBMS) FindCodingByCodingName(ctx context.Context, CodingName string) (entitycoding.Coding, error)

func (*DBMS) FindMenu

func (d *DBMS) FindMenu(ctx context.Context, MenuID uint) (entitymenu.Menu, error)

func (*DBMS) FindMenuByMenuName

func (d *DBMS) FindMenuByMenuName(ctx context.Context, MenuName string) (entitymenu.Menu, error)

func (*DBMS) FindUser

func (d *DBMS) FindUser(ctx context.Context, UserID uint) (entityUser.User, error)

func (*DBMS) FindUserByUserName

func (d *DBMS) FindUserByUserName(ctx context.Context, Username string) (entityUser.User, error)

func (*DBMS) GetChildrenCodings

func (d *DBMS) GetChildrenCodings(ctx context.Context, inputParent int) ([]entitycoding.Coding, error)

func (*DBMS) GetCodings

func (d *DBMS) GetCodings(ctx context.Context, inputLevel int) ([]entitycoding.Coding, error)

func (*DBMS) GetMenus

func (d *DBMS) GetMenus(ctx context.Context) ([]entitymenu.Menu, error)

func (*DBMS) GetUsers

func (d *DBMS) GetUsers(ctx context.Context) ([]entityUser.User, error)

func (*DBMS) IsCodingExist

func (d *DBMS) IsCodingExist(ctx context.Context, codingID uint) (bool, error)

this method is for validation dependencies which must respect

func (*DBMS) IsMenuExist

func (d *DBMS) IsMenuExist(ctx context.Context, menuID uint) (bool, error)

this method is for validation dependencies which must respect

func (*DBMS) IsUserExist

func (d *DBMS) IsUserExist(ctx context.Context, userID uint) (bool, error)

this method is for validation dependencies which must respect

func (*DBMS) MenuNameExist

func (d *DBMS) MenuNameExist(ctx context.Context, input string) error

func (*DBMS) NewCoding

func (d *DBMS) NewCoding(ctx context.Context, inputCoding entitycoding.Coding) error

func (*DBMS) NewMenu

func (d *DBMS) NewMenu(ctx context.Context, inputMenu entitymenu.Menu) error

func (*DBMS) NewUser

func (d *DBMS) NewUser(ctx context.Context, inputUser entityUser.User) error

func (*DBMS) UsernameExist

func (d *DBMS) UsernameExist(ctx context.Context, input string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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