sysdb

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const OpenOptions = "?_busy_timeout=30000" +
	"&_foreign_keys=on" +
	"&_journal_mode=WAL" +
	"&_locking_mode=NORMAL" +
	"&_synchronous=3"

Deprecated

Variables

This section is empty.

Functions

func GetSysdbVersion added in v0.10.0

func GetSysdbVersion(dbconnstr string) (int64, error)

func GoUpdateUserPerms added in v1.0.4

func GoUpdateUserPerms(dc, dcsuper *pgx.Conn, trackedTables []dbx.Table)

func Init

func Init(s string) error

Deprecated

func InitCreate

func InitCreate(connString string) error

func UserRead added in v0.9.0

func UserRead(dq dbx.Queryable) (map[string]*util.RegexList, error)
func UpdateUser(rq *api.UserUpdateRequest) error {
	sysMu.Lock()
	defer sysMu.Unlock()

	return userWrite(rq.Name, rq.Tables)
}
func DeleteUser(rq *api.UserDeleteRequest) (*api.UserDeleteResponse, error) {
	sysMu.Lock()
	defer sysMu.Unlock()

	found, err := userDelete(rq.Name)
	if err != nil {
		return nil, err
	}
	return &api.UserDeleteResponse{NameNotFound: !found}, nil
}

func ValidateSysdbVersion added in v0.10.0

func ValidateSysdbVersion(dbconnstr string) error

Types

type ColumnSchema

type ColumnSchema struct {
	Name       string
	DType      command.DataType
	DTypeSize  int64
	PrimaryKey int
	Data       any
}

type DatabaseConnector

type DatabaseConnector struct {
	// ID              int64
	// Name            string
	// Type            string
	DBHost          string
	DBPort          string
	DBName          string
	DBAdminUser     string
	DBAdminPassword string
	DBSuperUser     string
	DBSuperPassword string
	// DBUsers         string
	// DBSSLMode       string
	DBAccount string
	Status    status.Status
}

type SourceConnector

type SourceConnector struct {
	ID               int64
	Name             string
	Enable           bool
	Brokers          string
	Security         string
	Topics           []string
	Group            string
	SchemaPassFilter []string
	SchemaStopFilter []string
	TableStopFilter  []string
	TrimSchemaPrefix string
	AddSchemaPrefix  string
	Module           string
	Status           status.Status
}

func ReadSourceConnectors

func ReadSourceConnectors(db *dbx.DB) ([]*SourceConnector, error)

type TableSchema

type TableSchema struct {
	Column []ColumnSchema
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳