model

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBEngine

type DBEngine struct {
	*gorm.DB
	// contains filtered or unexported fields
}

func NewDBEngine

func NewDBEngine() *DBEngine

func (*DBEngine) Run

func (db *DBEngine) Run() error

func (*DBEngine) WithDBName

func (db *DBEngine) WithDBName(name string) *DBEngine

func (*DBEngine) WithIp

func (db *DBEngine) WithIp(ip string) *DBEngine

func (*DBEngine) WithPassword

func (db *DBEngine) WithPassword(password string) *DBEngine

func (*DBEngine) WithPort

func (db *DBEngine) WithPort(port string) *DBEngine

func (*DBEngine) WithUserName

func (db *DBEngine) WithUserName(userName string) *DBEngine

type Password

type Password struct {
	gorm.Model
	UserID   uint   `gorm:"uniqueIndex"`
	Password string `gorm:"not null"`
}

type Repository

type Repository struct {
	gorm.Model
	UserID uint
	Name   string `gorm:"uniqueIndex;not null;size:24"`
	Desc   string `gorm:"not null;size:256"`
}

type User

type User struct {
	gorm.Model

	Name  string `gorm:"uniqueIndex;not null;size:24" form:"username"`
	Email string `gorm:"uniqueIndex;not null;size:24" form:"email"`

	Repositories []Repository
}

Jump to

Keyboard shortcuts

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