database

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: MIT, MIT Imports: 3 Imported by: 0

Documentation

Overview

Package database provides the Chrome DevTools Protocol commands, types, and events for the Database domain.

Generated by the cdproto-gen command.

Index

Constants

View Source
const (
	CommandDisable               = "Database.disable"
	CommandEnable                = "Database.enable"
	CommandExecuteSQL            = "Database.executeSQL"
	CommandGetDatabaseTableNames = "Database.getDatabaseTableNames"
)

Command names.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

Database database object.

See: https://chromedevtools.github.io/devtools-protocol/tot/Database#type-Database

type DisableParams

type DisableParams struct{}

DisableParams disables database tracking, prevents database events from being sent to the client.

func Disable

func Disable() *DisableParams

Disable disables database tracking, prevents database events from being sent to the client.

See: https://chromedevtools.github.io/devtools-protocol/tot/Database#method-disable

func (*DisableParams) Do

func (p *DisableParams) Do(ctx context.Context) (err error)

Do executes Database.disable against the provided context.

type EnableParams

type EnableParams struct{}

EnableParams enables database tracking, database events will now be delivered to the client.

func Enable

func Enable() *EnableParams

Enable enables database tracking, database events will now be delivered to the client.

See: https://chromedevtools.github.io/devtools-protocol/tot/Database#method-enable

func (*EnableParams) Do

func (p *EnableParams) Do(ctx context.Context) (err error)

Do executes Database.enable against the provided context.

type Error

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

Error database error.

See: https://chromedevtools.github.io/devtools-protocol/tot/Database#type-Error

type EventAddDatabase

type EventAddDatabase struct {
	Database *Database `json:"database"`
}

EventAddDatabase [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Database#event-addDatabase

type ExecuteSQLParams

type ExecuteSQLParams struct {
	DatabaseID ID     `json:"databaseId"`
	Query      string `json:"query"`
}

ExecuteSQLParams [no description].

func ExecuteSQL

func ExecuteSQL(databaseID ID, query string) *ExecuteSQLParams

ExecuteSQL [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Database#method-executeSQL

parameters:

databaseID
query

func (*ExecuteSQLParams) Do

func (p *ExecuteSQLParams) Do(ctx context.Context) (columnNames []string, values []json.RawMessage, sqlError *Error, err error)

Do executes Database.executeSQL against the provided context.

returns:

columnNames
values
sqlError

type ExecuteSQLReturns

type ExecuteSQLReturns struct {
	ColumnNames []string          `json:"columnNames,omitempty"`
	Values      []json.RawMessage `json:"values,omitempty"`
	SQLError    *Error            `json:"sqlError,omitempty"`
}

ExecuteSQLReturns return values.

type GetDatabaseTableNamesParams

type GetDatabaseTableNamesParams struct {
	DatabaseID ID `json:"databaseId"`
}

GetDatabaseTableNamesParams [no description].

func GetDatabaseTableNames

func GetDatabaseTableNames(databaseID ID) *GetDatabaseTableNamesParams

GetDatabaseTableNames [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Database#method-getDatabaseTableNames

parameters:

databaseID

func (*GetDatabaseTableNamesParams) Do

func (p *GetDatabaseTableNamesParams) Do(ctx context.Context) (tableNames []string, err error)

Do executes Database.getDatabaseTableNames against the provided context.

returns:

tableNames

type GetDatabaseTableNamesReturns

type GetDatabaseTableNamesReturns struct {
	TableNames []string `json:"tableNames,omitempty"`
}

GetDatabaseTableNamesReturns return values.

type ID

type ID string

ID unique identifier of Database object.

See: https://chromedevtools.github.io/devtools-protocol/tot/Database#type-DatabaseId

func (ID) String

func (t ID) String() string

String returns the ID as string value.

Jump to

Keyboard shortcuts

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