model

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector struct {
	ID          int       `db:"id"`
	SourceType  string    `db:"source_type"`
	SourceTable string    `db:"source_table"`
	SourceDB    string    `db:"source_db"`
	SourceId    string    `db:"source_id"`
	CreateTime  time.Time `db:"create_time"`
	UpdateTime  time.Time `db:"update_time"`
}

type ConnectorModel

type ConnectorModel struct {
	// contains filtered or unexported fields
}

func NewConnectorModel

func NewConnectorModel(dsn string) *ConnectorModel

func (*ConnectorModel) All

func (d *ConnectorModel) All() ([]*Connector, error)

func (*ConnectorModel) DeleteBySourceId

func (d *ConnectorModel) DeleteBySourceId(id string) error

func (*ConnectorModel) Find

func (d *ConnectorModel) Find(id int) (*Connector, error)

func (*ConnectorModel) FindByDb

func (d *ConnectorModel) FindByDb(dbname string, start, end int) ([]*Connector, error)

func (*ConnectorModel) FindIn

func (d *ConnectorModel) FindIn(ids ...int) ([]*Connector, error)

func (*ConnectorModel) GetAllDb

func (d *ConnectorModel) GetAllDb() ([]string, error)

func (*ConnectorModel) GetCountByDb

func (d *ConnectorModel) GetCountByDb(db string) (int64, error)

func (*ConnectorModel) Insert

func (d *ConnectorModel) Insert(v *Connector) (int, error)

type Dm

type Dm struct {
	ID              int       `db:"id"`
	Name            string    `db:"name" length:"24" index:""`
	SourceType      string    `db:"source_type"`
	SourceDsn       string    `db:"source_dsn"`
	SourceDb        string    `db:"source_db"`
	SourceTable     string    `db:"source_table"`
	SourceQueryKey  string    `db:"source_query_key"`
	TargetType      string    `db:"target_type"`
	TargetShards    string    `db:"target_shards"`
	TargetDB        string    `db:"target_db"`
	TargetChProxy   string    `db:"target_ch_proxy"`
	TargetTable     string    `db:"target_table"`
	WindowStartHour int       `db:"window_start_hour"`
	WindowEndHour   int       `db:"window_end_hour"`
	CreateTime      time.Time `db:"create_time"`
	UpdateTime      time.Time `db:"update_time"`
	Suffix          string    `db:"suffix"`
}

type DmModel

type DmModel struct {
	// contains filtered or unexported fields
}

func NewDmModel

func NewDmModel(dsn string) *DmModel

func (*DmModel) All

func (d *DmModel) All() ([]*Dm, error)

func (*DmModel) Delete

func (d *DmModel) Delete(id int) error

func (*DmModel) Find

func (d *DmModel) Find(id int) (*Dm, error)

func (*DmModel) FindByDb

func (r *DmModel) FindByDb(db string, page, pageSize int) ([]*Dm, error)

func (*DmModel) FindIn

func (d *DmModel) FindIn(ids ...int) ([]*Dm, error)

func (*DmModel) GetAllDb

func (r *DmModel) GetAllDb() ([]*Rtu, error)

func (*DmModel) GetCountByDb

func (r *DmModel) GetCountByDb(db string) (int64, error)

func (*DmModel) Insert

func (d *DmModel) Insert(v *Dm) (int, error)

type Group

type Group struct {
	ID         int       `db:"id"`
	Name       string    `db:"name" length:"36"`
	CreateTime time.Time `db:"create_time"`
	UpdateTime time.Time `db:"update_time"`
}

type GroupModel

type GroupModel struct {
	// contains filtered or unexported fields
}

func NewGroupModel

func NewGroupModel(dsn string) *GroupModel

type Permission

type Permission struct {
	ID         int       `db:"id"`
	Module     int       `db:"module" index:""`
	CreateTime time.Time `db:"create_time"`
	UpdateTime time.Time `db:"update_time"`
}

type PermissionModel

type PermissionModel struct {
	// contains filtered or unexported fields
}

func NewPermissionModel

func NewPermissionModel(dsn string) *PermissionModel

type Rtu

type Rtu struct {
	ID             int       `db:"id"`
	Name           string    `db:"name" index:""`
	SourceType     string    `db:"source_type"`
	SourceDsn      string    `db:"source_dsn"`
	SourceTable    string    `db:"source_table"`
	SourceDb       string    `db:"source_db"`
	SourceQueryKey string    `db:"source_query_key"`
	SourceTopic    string    `db:"source_topic"`
	TargetType     string    `db:"target_type"`
	TargetShards   string    `db:"target_shards"`
	TargetDB       string    `db:"target_db"`
	TargetChProxy  string    `db:"target_ch_proxy"`
	TargetTable    string    `db:"target_table"`
	CreateTime     time.Time `db:"create_time"`
	UpdateTime     time.Time `db:"update_time"`
	Status         string    `db:"status"`
}

type RtuModel

type RtuModel struct {
	// contains filtered or unexported fields
}

func NewRtuModel

func NewRtuModel(dsn string) *RtuModel

func (*RtuModel) All

func (r *RtuModel) All() ([]*Rtu, error)

func (*RtuModel) Delete

func (r *RtuModel) Delete(id int) error

func (*RtuModel) Find

func (r *RtuModel) Find(id int) (*Rtu, error)

func (*RtuModel) FindByDb

func (r *RtuModel) FindByDb(db string, page, pageSize int) ([]*Rtu, error)

func (*RtuModel) FindIn

func (r *RtuModel) FindIn(ids ...int) ([]*Rtu, error)

func (*RtuModel) GetAllDb

func (r *RtuModel) GetAllDb() ([]*Rtu, error)

func (*RtuModel) GetCountByDb

func (r *RtuModel) GetCountByDb(db string) (int64, error)

func (*RtuModel) GetExist

func (r *RtuModel) GetExist() ([]*Rtu, error)

func (*RtuModel) Insert

func (r *RtuModel) Insert(v *Rtu) (int, error)

func (*RtuModel) Update

func (r *RtuModel) Update(id int, status string) error

type User

type User struct {
	ID         int       `db:"id"`
	GroupID    int       `db:"group_id" index:""`
	Name       string    `db:"name" length:"36"`
	Email      string    `db:"email" length:"36" index:""`
	Password   string    `db:"password" length:"36"`
	Token      string    `db:"token" length:"36" index:""`
	CreateTime time.Time `db:"create_time"`
	UpdateTime time.Time `db:"update_time"`
}

type UserModel

type UserModel struct {
	// contains filtered or unexported fields
}

func NewUserModel

func NewUserModel(dsn string) *UserModel

func (*UserModel) FindByEmail

func (u *UserModel) FindByEmail(email string) (*User, error)

func (*UserModel) Register

func (u *UserModel) Register(user User) (string, error)

Jump to

Keyboard shortcuts

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