Documentation ¶
Index ¶
- Constants
- Variables
- func ConnectorWithOptions(ctx context.Context, options ...ConnectionOption) (*connector, error)
- func Open(connStr string) (driver.Conn, error)
- func WithAttachment(ctx context.Context, paramName string, r io.ReadCloser) context.Context
- func WithAuthClient(authClient AuthClient) func(*connectionOptions)
- func WithHTTPClient(client *http.Client) func(*connectionOptions)
- func WithInsecureTLS() func(*connectionOptions)
- func WithServer(server string) func(*connectionOptions)
- func WithSessionID(sessionID string) func(*connectionOptions)
- func WithStaticToken(token string) func(*connectionOptions)
- type AuthClient
- type AuthMessage
- type Conn
- func (*Conn) Begin() (driver.Tx, error)
- func (c *Conn) Close() error
- func (c *Conn) Exec(query string, args []driver.Value) (driver.Result, error)
- func (c *Conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)
- func (c *Conn) GetContext() apiv2.ResultSetContext
- func (c *Conn) Ping(ctx context.Context) error
- func (c *Conn) Prepare(query string) (driver.Stmt, error)
- func (c *Conn) Query(query string, args []driver.Value) (driver.Rows, error)
- func (c *Conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)
- type ConnectionOption
- type DPConn
- type Driver
- type ErrClientError
- type ErrInterfaceError
- type ErrSQLError
- type ErrServerError
- type ErrStatementClosed
- type PrintTopicColumn
- type PrintTopicDataMessage
- type PrintTopicErrorMessage
- type PrintTopicMessage
- type PrintTopicMetadataMessage
- type ResultSetConn
- type SqlState
- type TokenInfo
- type TokenManager
Constants ¶
View Source
const ( SqlStateSuccessfulCompletion = SqlState00000 SqlStateWarning = SqlState01000 SqlStatePrivilegeNotGranted = SqlState01007 SqlStatePrivilegeNotRevoked = SqlState01006 SqlStateStringDataRightTruncation = SqlState01004 SqlStateDeprecatedFeature = SqlState01P01 SqlStateNoData = SqlState02000 SqlStateSqlStatementNotYetComplete = SqlState03000 SqlStateFeatureNotSupported = SqlState0A000 SqlStateInvalidGrantor = SqlState0L000 SqlStateInvalidGrantOperation = SqlState0LP01 SqlStateDependentObjectsStillExist = SqlState2BP01 SqlStateInvalidUser = SqlState3D000 SqlStateInvalidRole = SqlState3D001 SqlStateInvalidDatabase = SqlState3D002 SqlStateInvalidSchema = SqlState3D003 SqlStateInvalidOrganization = SqlState3D004 SqlStateInvalidRegion = SqlState3D005 SqlStateInvalidStore = SqlState3D006 SqlStateInvalidTopic = SqlState3D007 SqlStateInvalidParameter = SqlState3D008 SqlStateInvalidSchemaRegistry = SqlState3D009 SqlStateInvalidDescriptor = SqlState3D010 SqlStateInvalidDescriptorSource = SqlState3D011 SqlStateInvalidApiToken = SqlState3D012 SqlStateInvalidSecurityIntegration = SqlState3D013 SqlStateInvalidMetricsIntegration = SqlState3D014 SqlStateInvalidSandbox = SqlState3D015 SqlStateInvalidSecret = SqlState3D016 SqlStateInvalidFunction = SqlState3D017 SqlStateInvalidFunctionSource = SqlState3D018 SqlStateInvalidQuery = SqlState3D019 SqlStateInvalidRelation = SqlState3D020 SqlStateMissingParameter = SqlState3D021 SqlStateStoreNotReady = SqlState3E001 SqlStateSchemaRegistryNotReady = SqlState3E002 SqlStateRelationNotReady = SqlState3E003 SqlStateInsufficientPrivilege = SqlState42501 SqlStateSyntaxError = SqlState42601 SqlStateNameTooLong = SqlState42622 SqlStateDuplicateObject = SqlState42710 SqlStateDuplicateDatabase = SqlState42P04 SqlStateDuplicateStore = SqlState42P05 SqlStateDuplicateSchema = SqlState42P06 SqlStateDuplicateUser = SqlState42P07 SqlStateDuplicateTopicDescriptor = SqlState42P08 SqlStateDuplicateApiToken = SqlState42P09 SqlStateDuplicateSecurityIntegration = SqlState42P10 SqlStateDuplicateRole = SqlState42P11 SqlStateDuplicateMetricsIntegration = SqlState42P12 SqlStateDuplicateSandbox = SqlState42P13 SqlStateDuplicateSecret = SqlState42P14 SqlStateDuplicateFunction = SqlState42P15 SqlStateDuplicateFunctionSource = SqlState42P16 SqlStateDuplicateRelation = SqlState42P17 SqlStateDuplicateSchemaRegistry = SqlState42P18 SqlStateAmbiguousOrganization = SqlState42P001 SqlStateAmbiguousStore = SqlState42P002 SqlStateConfigurationLimitExceeded = SqlState53000 SqlStateInternalError = SqlStateXX000 SqlStateUndefined = SqlStateXX001 SqlStateCancelled = SqlState57000 SqlStateTimeout = SqlState57014 )
Variables ¶
View Source
var ErrAuthenticationError = fmt.Errorf("error while authenticating with server")
View Source
var ErrDeadlineExceeded = fmt.Errorf("deadline exceeded")
View Source
var ErrNotSupported = &ErrClientError{message: "feature is not supported"}
Functions ¶
func ConnectorWithOptions ¶
func ConnectorWithOptions(ctx context.Context, options ...ConnectionOption) (*connector, error)
OpenWithHTTPClient returns a new connection to the database. The returned connection must only used by one goroutine at a time.
func WithAttachment ¶
func WithAuthClient ¶
func WithAuthClient(authClient AuthClient) func(*connectionOptions)
func WithHTTPClient ¶
func WithInsecureTLS ¶
func WithInsecureTLS() func(*connectionOptions)
func WithServer ¶
func WithServer(server string) func(*connectionOptions)
func WithSessionID ¶
func WithSessionID(sessionID string) func(*connectionOptions)
func WithStaticToken ¶
func WithStaticToken(token string) func(*connectionOptions)
Types ¶
type AuthClient ¶
type AuthMessage ¶
type Conn ¶
func (*Conn) ExecContext ¶
func (*Conn) GetContext ¶
func (c *Conn) GetContext() apiv2.ResultSetContext
type ConnectionOption ¶
type ConnectionOption func(*connectionOptions)
type DPConn ¶
type DPConn struct { apiv2.DataplaneRequest // contains filtered or unexported fields }
type Driver ¶
type Driver struct{}
Driver is the DeltaStream database driver.
type ErrClientError ¶
type ErrClientError struct {
// contains filtered or unexported fields
}
ErrClientError is raised when client has an internal error while processing a message
func (*ErrClientError) Error ¶
func (e *ErrClientError) Error() string
func (*ErrClientError) Unwrap ¶
func (e *ErrClientError) Unwrap() error
type ErrInterfaceError ¶
type ErrInterfaceError struct {
// contains filtered or unexported fields
}
ErrInterfaceError is raised when there is a mismatch between the expected interface between client and server
func (*ErrInterfaceError) Error ¶
func (e *ErrInterfaceError) Error() string
func (*ErrInterfaceError) Unwrap ¶
func (e *ErrInterfaceError) Unwrap() error
type ErrSQLError ¶
func (ErrSQLError) Error ¶
func (e ErrSQLError) Error() string
type ErrServerError ¶
type ErrServerError struct {
// contains filtered or unexported fields
}
ErrServerError is raised when server has an internal error while processing a message
func (*ErrServerError) Error ¶
func (e *ErrServerError) Error() string
type ErrStatementClosed ¶
type ErrStatementClosed struct{}
func (*ErrStatementClosed) Error ¶
func (*ErrStatementClosed) Error() string
type PrintTopicColumn ¶
type PrintTopicDataMessage ¶
type PrintTopicErrorMessage ¶
type PrintTopicMessage ¶
type PrintTopicMessage struct { Type string `json:"type"` Err PrintTopicErrorMessage `json:"-"` Metadata PrintTopicMetadataMessage `json:"-"` Data PrintTopicDataMessage `json:"-"` }
func (*PrintTopicMessage) UnmarshalJSON ¶
func (m *PrintTopicMessage) UnmarshalJSON(b []byte) error
type PrintTopicMetadataMessage ¶
type PrintTopicMetadataMessage struct { Type string `json:"type"` Headers map[string]string `json:"headers"` Columns []PrintTopicColumn `json:"columns"` }
type ResultSetConn ¶
type ResultSetConn interface {
// contains filtered or unexported methods
}
type SqlState ¶
type SqlState string
const ( SqlState00000 SqlState = "00000" SqlState01000 SqlState = "01000" SqlState01004 SqlState = "01004" SqlState01006 SqlState = "01006" SqlState01007 SqlState = "01007" SqlState01P01 SqlState = "01P01" SqlState02000 SqlState = "02000" SqlState03000 SqlState = "03000" SqlState0A000 SqlState = "0A000" SqlState0L000 SqlState = "0L000" SqlState0LP01 SqlState = "0LP01" SqlState2BP01 SqlState = "2BP01" SqlState3D000 SqlState = "3D000" SqlState3D001 SqlState = "3D001" SqlState3D002 SqlState = "3D002" SqlState3D003 SqlState = "3D003" SqlState3D004 SqlState = "3D004" SqlState3D005 SqlState = "3D005" SqlState3D006 SqlState = "3D006" SqlState3D007 SqlState = "3D007" SqlState3D008 SqlState = "3D008" SqlState3D009 SqlState = "3D009" SqlState3D010 SqlState = "3D010" SqlState3D011 SqlState = "3D011" SqlState3D012 SqlState = "3D012" SqlState3D013 SqlState = "3D013" SqlState3D014 SqlState = "3D014" SqlState3D015 SqlState = "3D015" SqlState3D016 SqlState = "3D016" SqlState3D017 SqlState = "3D017" SqlState3D018 SqlState = "3D018" SqlState3D019 SqlState = "3D019" SqlState3D020 SqlState = "3D020" SqlState3D021 SqlState = "3D021" SqlState3E001 SqlState = "3E001" SqlState3E002 SqlState = "3E002" SqlState3E003 SqlState = "3E003" SqlState42501 SqlState = "42501" SqlState42601 SqlState = "42601" SqlState42622 SqlState = "42622" SqlState42710 SqlState = "42710" SqlState42P04 SqlState = "42P04" SqlState42P05 SqlState = "42P05" SqlState42P06 SqlState = "42P06" SqlState42P07 SqlState = "42P07" SqlState42P08 SqlState = "42P08" SqlState42P09 SqlState = "42P09" SqlState42P10 SqlState = "42P010" SqlState42P11 SqlState = "42P011" SqlState42P12 SqlState = "42P012" SqlState42P13 SqlState = "42P013" SqlState42P14 SqlState = "42P014" SqlState42P15 SqlState = "42P015" SqlState42P16 SqlState = "42P016" SqlState42P17 SqlState = "42P017" SqlState42P18 SqlState = "42P018" SqlState42P001 SqlState = "42P001" SqlState42P002 SqlState = "42P002" SqlState57014 SqlState = "57014" SqlState57015 SqlState = "57015" SqlState57000 SqlState = "57000" SqlState53000 SqlState = "53000" SqlStateXX000 SqlState = "XX000" SqlStateXX001 SqlState = "XX001" )
type TokenManager ¶
type TokenManager interface { // If access token is empty will call through login flow. If access token // has expired it will request a new one using refresh token GetToken(context.Context) (string, error) // From oauth2.TokenSource Token() (*oauth2.Token, error) }
func NewStaticTokenManager ¶
func NewStaticTokenManager(ctx context.Context, token string) TokenManager
func NewTokenManager ¶
func NewTokenManager(ctx context.Context, authClient AuthClient) TokenManager
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package apiv2 provides primitives to interact with the openapi HTTP API.
|
Package apiv2 provides primitives to interact with the openapi HTTP API. |
Package dpapiv2 provides primitives to interact with the openapi HTTP API.
|
Package dpapiv2 provides primitives to interact with the openapi HTTP API. |
Click to show internal directories.
Click to hide internal directories.