db

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(ctx context.Context, parent int64, name, description string) (int64, string, error)

func Change

func Change(ctx context.Context, id int64, name, description string) (bool, error)

Change properties

func Code

func Code(ctx context.Context, id int64) (bool, string, error)

func Get

func Get(ctx context.Context, id int64) (*grpc_slave.Data, error)

func Init

func Init()

func LastModified

func LastModified() (modtime time.Time)

func Parent

func Parent(ctx context.Context, id, parent int64) (bool, error)

func Remove

func Remove(ctx context.Context, ids []int64) (int64, error)

Types

type DataOfSlave

type DataOfSlave struct {
	ID          int64  `xorm:"pk autoincr 'id'"`
	Name        string `xorm:"unique 'name' default('') "`
	Description string `xorm:"'description' default('') "`
	Code        string `xorm:"unique 'code' default('') "`
	Parent      int64  `xorm:"index 'parent' default(0) "`
}

func (DataOfSlave) TableName

func (DataOfSlave) TableName() string

func (*DataOfSlave) ToPB

func (d *DataOfSlave) ToPB() *grpc_slave.Data

Jump to

Keyboard shortcuts

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