domain

package
v0.0.0-...-c8dbcfe Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DomainSet = wire.NewSet(wire.Struct(new(DomainRepo), "*"))

Functions

func GetDomainDB

func GetDomainDB(ctx context.Context, defDB *gorm.DB) *gorm.DB

Types

type Domain

type Domain struct {
	util.Model
	DeletedAt gorm.DeletedAt `gorm:"column:delete_at;index" json:"-"`
	Name      string         `gorm:"column:name;unique"     json:"name,omitempty"`
	Status    int            `gorm:"index;"`           // 状态(1:启用 0:禁用)
	Type      int            `gorm:"index;default:1;"` // domain 类型
	Memo      *string        `gorm:"size:1024;"`       // 备注
	Admin     uint64         `gorm:"index;default:0;"` // 管理员用户内码
}

Domain sample for caskin.Domain interface

func (Domain) ToSchemaDomain

func (a Domain) ToSchemaDomain() *schema.Domain

type DomainRepo

type DomainRepo struct {
	DB *gorm.DB
}

func (*DomainRepo) Create

func (a *DomainRepo) Create(ctx context.Context, item schema.Domain) error

func (*DomainRepo) Delete

func (a *DomainRepo) Delete(ctx context.Context, id uint64) error

func (*DomainRepo) Get

func (*DomainRepo) Query

func (*DomainRepo) Update

func (a *DomainRepo) Update(ctx context.Context, id uint64, item schema.Domain) error

func (*DomainRepo) UpdateStatus

func (a *DomainRepo) UpdateStatus(ctx context.Context, id uint64, status int) error

type Domains

type Domains []*Domain

func (Domains) ToSchemaDomains

func (a Domains) ToSchemaDomains() []*schema.Domain

type SchemaDomain

type SchemaDomain schema.Domain

func (SchemaDomain) ToDomain

func (a SchemaDomain) ToDomain() *Domain

Jump to

Keyboard shortcuts

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