controller

package
v1.6.1-release Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright [2018] [jc3wish]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var StartTime = ""

Functions

func AdminTemplatePath

func AdminTemplatePath(fileName string) string

func CheckUserSlavePrivilege

func CheckUserSlavePrivilege(db mysql.MysqlConnection) (err error)

校验用户是否拥有权限

func DBConnect

func DBConnect(uri string) mysql.MysqlConnection

func GetGrantsFor

func GetGrantsFor(db mysql.MysqlConnection) (grantSQL string, err error)

获取当前用户授权语句

func GetSchemaList

func GetSchemaList(db mysql.MysqlConnection) []string

func GetServerId

func GetServerId(db mysql.MysqlConnection) int

func GetVariables

func GetVariables(db mysql.MysqlConnection, variablesValue string) (data map[string]string)

func PluginTemplatePath

func PluginTemplatePath(fileName string) string

func ShowTableCreate

func ShowTableCreate(db mysql.MysqlConnection, schema, table string) string

Types

type BackupController

type BackupController struct {
	CommonController
}

func (*BackupController) Export

func (c *BackupController) Export()

导出配置

func (*BackupController) Import

func (c *BackupController) Import()

导入配置

type ChannelController

type ChannelController struct {
	CommonController
}

func (*ChannelController) Add

func (c *ChannelController) Add()

func (*ChannelController) Close

func (c *ChannelController) Close()

func (*ChannelController) Delete

func (c *ChannelController) Delete()

func (*ChannelController) Index

func (c *ChannelController) Index()

func (*ChannelController) List

func (c *ChannelController) List()

func (*ChannelController) Start

func (c *ChannelController) Start()

func (*ChannelController) Stop

func (c *ChannelController) Stop()

func (*ChannelController) TableList

func (c *ChannelController) TableList()

func (*ChannelController) TableListIndex

func (c *ChannelController) TableListIndex()

type ChannelParam

type ChannelParam struct {
	DbName       string
	ChannelId    int
	ChannelName  string
	CosumerCount int
}

type CommonController

type CommonController struct {
	xgo.Controller
}

func (*CommonController) AddAdminTemplate

func (c *CommonController) AddAdminTemplate(tpl ...string)

func (*CommonController) AddPluginTemplate

func (c *CommonController) AddPluginTemplate(tpl ...string)

func (*CommonController) Prepare

func (c *CommonController) Prepare()

func (*CommonController) SetTitle

func (c *CommonController) SetTitle(title string)

type DBController

type DBController struct {
	CommonController
}

func (*DBController) Add

func (c *DBController) Add()

add 数据源

func (*DBController) CheckUri

func (c *DBController) CheckUri()

验证连接配置是否有效

func (*DBController) Close

func (c *DBController) Close()

关闭数据源

func (*DBController) Cmdline

func (c *DBController) Cmdline()

cmdline

func (*DBController) Default

func (c *DBController) Default()

默认

func (*DBController) Delete

func (c *DBController) Delete()

删除数据源

func (*DBController) Detail

func (c *DBController) Detail()

func (*DBController) GetLastPosition

func (c *DBController) GetLastPosition()

验证连接配置是否有效

func (*DBController) GetTableFields

func (c *DBController) GetTableFields()

func (*DBController) Index

func (c *DBController) Index()

数据源列表,界面显示

func (*DBController) List

func (c *DBController) List()

db list

func (*DBController) Profile

func (c *DBController) Profile()

Profile

func (*DBController) ShowCreateSQL

func (c *DBController) ShowCreateSQL()

func (*DBController) Start

func (c *DBController) Start()

启动数据源

func (*DBController) Stop

func (c *DBController) Stop()

暂停数据源

func (*DBController) Symbol

func (c *DBController) Symbol()

Symbol

func (*DBController) TableList

func (c *DBController) TableList()

func (*DBController) Trace

func (c *DBController) Trace()

Trace

func (*DBController) Update

func (c *DBController) Update()

update 数据源

type DbUpdateParam

type DbUpdateParam struct {
	DbName            string
	SchemaName        string
	TableName         string
	Uri               string
	BinlogFileName    string
	BinlogPosition    uint32
	ServerId          uint32
	MaxBinlogFileName string
	MaxBinlogPosition uint32
	UpdateToServer    int8
	CheckPrivilege    bool
}

type DocsController

type DocsController struct {
	CommonController
}

func (*DocsController) Index

func (c *DocsController) Index()

type FileQueueController

type FileQueueController struct {
	CommonController
}

func (*FileQueueController) GetInfo

func (c *FileQueueController) GetInfo()

func (*FileQueueController) Update

func (c *FileQueueController) Update()

type FlowController

type FlowController struct {
	CommonController
}

func (*FlowController) GetFlow

func (c *FlowController) GetFlow()

func (*FlowController) Index

func (c *FlowController) Index()

type HistoryController

type HistoryController struct {
	CommonController
}

func (*HistoryController) Add

func (c *HistoryController) Add()

func (*HistoryController) CheckWhere

func (c *HistoryController) CheckWhere()

func (*HistoryController) Delete

func (c *HistoryController) Delete()

func (*HistoryController) Index

func (c *HistoryController) Index()

func (*HistoryController) Kill

func (c *HistoryController) Kill()

func (*HistoryController) List

func (c *HistoryController) List()

func (*HistoryController) Start

func (c *HistoryController) Start()

func (*HistoryController) Stop

func (c *HistoryController) Stop()

type HistoryParam

type HistoryParam struct {
	DbName      string
	SchemaName  string
	TableName   string
	TableNames  string
	Property    history.HistoryProperty
	ToserverIds []int
	Id          int
}

type IndexController

type IndexController struct {
	CommonController
}

func (*IndexController) FreeOSMemory

func (c *IndexController) FreeOSMemory()

强制运行 golang gc

func (*IndexController) Index

func (c *IndexController) Index()

首页

func (*IndexController) Overview

func (c *IndexController) Overview()

Bifrostd 基本信息

func (*IndexController) ServerMonitor

func (c *IndexController) ServerMonitor()

获取 golang 运行的基本信息

type LoginController

type LoginController struct {
	UserController
}

func (*LoginController) Index

func (c *LoginController) Index()

func (*LoginController) Login

func (c *LoginController) Login()

func (*LoginController) Logout

func (c *LoginController) Logout()

type MasterBinlogInfoStruct

type MasterBinlogInfoStruct struct {
	File              string
	Position          int
	Binlog_Do_DB      string
	Binlog_Ignore_DB  string
	Executed_Gtid_Set string
}

type PluginController

type PluginController struct {
	CommonController
}

func (*PluginController) Index

func (c *PluginController) Index()

func (*PluginController) List

func (c *PluginController) List()

func (*PluginController) Reload

func (c *PluginController) Reload()

type PprofController

type PprofController struct {
	CommonController
}

type ResultDataStruct

type ResultDataStruct struct {
	Status int8        `json:"status"`
	Msg    string      `json:"msg"`
	Data   interface{} `json:"data"`
}

type TableController

type TableController struct {
	CommonController
}

func (*TableController) Add

func (c *TableController) Add()

func (*TableController) Delete

func (c *TableController) Delete()

func (*TableController) List

func (c *TableController) List()

func (*TableController) Update

func (c *TableController) Update()

type TableFileQueueParam

type TableFileQueueParam struct {
	DbName     string
	SchemaName string
	TableName  string
	ToServerId int
	Index      int
}

type TableListStruct

type TableListStruct struct {
	TableName string
	TableType string
}

func GetSchemaTableList

func GetSchemaTableList(db mysql.MysqlConnection, schema string) []TableListStruct

type TableParam

type TableParam struct {
	DbName      string
	SchemaName  string
	TableName   string
	IgnoreTable string
	ChannelId   int
	Id          int
}

type TableStruct

type TableStruct struct {
	COLUMN_NAME       *string
	COLUMN_DEFAULT    *string
	IS_NULLABLE       *string
	COLUMN_TYPE       *string
	COLUMN_KEY        *string
	EXTRA             *string
	COLUMN_COMMENT    *string
	DATA_TYPE         *string
	NUMERIC_PRECISION *uint64
	NUMERIC_SCALE     *uint64
}

func GetSchemaTableFieldList

func GetSchemaTableFieldList(db mysql.MysqlConnection, schema string, table string) []TableStruct

type TableSyncController

type TableSyncController struct {
	CommonController
}

func (*TableSyncController) Index

func (c *TableSyncController) Index()

func (*TableSyncController) List

func (c *TableSyncController) List()

type TableToServerController

type TableToServerController struct {
	CommonController
}

func (*TableToServerController) Add

func (c *TableToServerController) Add()

func (*TableToServerController) DealError

func (c *TableToServerController) DealError()

func (*TableToServerController) Delete

func (c *TableToServerController) Delete()

func (*TableToServerController) List

func (c *TableToServerController) List()

func (*TableToServerController) Start

func (c *TableToServerController) Start()

func (*TableToServerController) Stop

func (c *TableToServerController) Stop()

type TableToServerParam

type TableToServerParam struct {
	DbName        string
	SchemaName    string
	TableName     string
	ToServerKey   string
	PluginName    string
	FieldList     []string
	MustBeSuccess bool
	FilterQuery   bool
	FilterUpdate  bool
	PluginParam   map[string]interface{}
	ToServerId    int
	Index         int
}

type ToServerController

type ToServerController struct {
	CommonController
}

func (*ToServerController) Add

func (c *ToServerController) Add()

func (*ToServerController) CheckUri

func (c *ToServerController) CheckUri()

func (*ToServerController) Delete

func (c *ToServerController) Delete()

func (*ToServerController) Index

func (c *ToServerController) Index()

func (*ToServerController) List

func (c *ToServerController) List()

func (*ToServerController) Update

func (c *ToServerController) Update()

type ToServerParam

type ToServerParam struct {
	ToServerKey string
	PluginName  string
	Notes       string
	ConnUri     string
	MaxConn     int // 最大连接数
	MinConn     int // 最小连接数
}

type UserController

type UserController struct {
	CommonController
}

func (*UserController) Delete

func (c *UserController) Delete()

func (*UserController) Index

func (c *UserController) Index()

func (*UserController) List

func (c *UserController) List()

func (*UserController) Update

func (c *UserController) Update()

type UserParam

type UserParam struct {
	UserName string
	Password string
	Group    string
}

type WarningController

type WarningController struct {
	CommonController
}

func (*WarningController) Add

func (c *WarningController) Add()

func (*WarningController) Check

func (c *WarningController) Check()

func (*WarningController) Delete

func (c *WarningController) Delete()

func (*WarningController) Index

func (c *WarningController) Index()

func (*WarningController) List

func (c *WarningController) List()

type WarningParam

type WarningParam struct {
	Type  string
	Param map[string]interface{}
	Id    string
}

Jump to

Keyboard shortcuts

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