database

package
v0.0.0-...-076f285 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddDatabaseEvent

type AddDatabaseEvent struct {
	Database Database `json:"database"`
}

type Database

type Database struct {
	Id      DatabaseId `json:"id"`      // Database ID.
	Domain  string     `json:"domain"`  // Database domain.
	Name    string     `json:"name"`    // Database name.
	Version string     `json:"version"` // Database version.
}

type DatabaseAgent

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

func NewAgent

func NewAgent(conn *shared.Connection) *DatabaseAgent

func (*DatabaseAgent) FireAddDatabase

func (agent *DatabaseAgent) FireAddDatabase(event AddDatabaseEvent)

Dispatchable Events

func (*DatabaseAgent) FireAddDatabaseOnTarget

func (agent *DatabaseAgent) FireAddDatabaseOnTarget(targetId string, event AddDatabaseEvent)

func (*DatabaseAgent) Name

func (agent *DatabaseAgent) Name() string

func (*DatabaseAgent) ProcessCommand

func (agent *DatabaseAgent) ProcessCommand(id int64, targetId string, funcName string, data *json.RawMessage)

func (*DatabaseAgent) SetDisableHandler

func (agent *DatabaseAgent) SetDisableHandler(handler func(DisableCommand))

func (*DatabaseAgent) SetEnableHandler

func (agent *DatabaseAgent) SetEnableHandler(handler func(EnableCommand))

Commands Sent From Frontend

func (*DatabaseAgent) SetExecuteSQLHandler

func (agent *DatabaseAgent) SetExecuteSQLHandler(handler func(ExecuteSQLCommand))

func (*DatabaseAgent) SetGetDatabaseTableNamesHandler

func (agent *DatabaseAgent) SetGetDatabaseTableNamesHandler(handler func(GetDatabaseTableNamesCommand))

type DatabaseId

type DatabaseId string

type DisableCommand

type DisableCommand struct {
	DestinationTargetID string
	// contains filtered or unexported fields
}

func (*DisableCommand) Initalize

func (c *DisableCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*DisableCommand) Respond

func (c *DisableCommand) Respond()

func (*DisableCommand) RespondWithError

func (c *DisableCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type DisableCommandFn

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

func (*DisableCommandFn) Load

func (a *DisableCommandFn) Load() func(DisableCommand)

func (*DisableCommandFn) Store

func (a *DisableCommandFn) Store(fn func(DisableCommand))

type DisableReturn

type DisableReturn struct {
}

type EnableCommand

type EnableCommand struct {
	DestinationTargetID string
	// contains filtered or unexported fields
}

func (*EnableCommand) Initalize

func (c *EnableCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*EnableCommand) Respond

func (c *EnableCommand) Respond()

func (*EnableCommand) RespondWithError

func (c *EnableCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type EnableCommandFn

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

func (*EnableCommandFn) Load

func (a *EnableCommandFn) Load() func(EnableCommand)

func (*EnableCommandFn) Store

func (a *EnableCommandFn) Store(fn func(EnableCommand))

type EnableReturn

type EnableReturn struct {
}

type Error

type Error struct {
	Message string `json:"message"` // Error message.
	Code    int64  `json:"code"`    // Error code.
}

type ExecuteSQLCommand

type ExecuteSQLCommand struct {
	DestinationTargetID string

	DatabaseId DatabaseId `json:"databaseId"`
	Query      string     `json:"query"`
	// contains filtered or unexported fields
}

func (*ExecuteSQLCommand) Initalize

func (c *ExecuteSQLCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*ExecuteSQLCommand) Respond

func (c *ExecuteSQLCommand) Respond(r *ExecuteSQLReturn)

func (*ExecuteSQLCommand) RespondWithError

func (c *ExecuteSQLCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type ExecuteSQLCommandFn

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

func (*ExecuteSQLCommandFn) Load

func (a *ExecuteSQLCommandFn) Load() func(ExecuteSQLCommand)

func (*ExecuteSQLCommandFn) Store

func (a *ExecuteSQLCommandFn) Store(fn func(ExecuteSQLCommand))

type ExecuteSQLReturn

type ExecuteSQLReturn struct {
	ColumnNames *[]string      `json:"columnNames,omitempty"`
	Values      *[]interface{} `json:"values,omitempty"`
	SqlError    *Error         `json:"sqlError,omitempty"`
}

type GetDatabaseTableNamesCommand

type GetDatabaseTableNamesCommand struct {
	DestinationTargetID string

	DatabaseId DatabaseId `json:"databaseId"`
	// contains filtered or unexported fields
}

func (*GetDatabaseTableNamesCommand) Initalize

func (c *GetDatabaseTableNamesCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*GetDatabaseTableNamesCommand) Respond

func (*GetDatabaseTableNamesCommand) RespondWithError

func (c *GetDatabaseTableNamesCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type GetDatabaseTableNamesCommandFn

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

func (*GetDatabaseTableNamesCommandFn) Load

func (*GetDatabaseTableNamesCommandFn) Store

type GetDatabaseTableNamesReturn

type GetDatabaseTableNamesReturn struct {
	TableNames []string `json:"tableNames"`
}

Jump to

Keyboard shortcuts

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