configurations

package
v2.8.22 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 28 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdvNegoServiceInfo

type AdvNegoServiceInfo struct {
	AuthService     []string
	EncServiceLevel int
	IntServiceLevel int
}

type AuthType

type AuthType int
const (
	Normal   AuthType = 0
	OS       AuthType = 1
	Kerberos AuthType = 2
	TCPS     AuthType = 3
)

type ClientInfo

type ClientInfo struct {
	ProgramPath string
	ProgramName string
	OSUserName  string
	OSPassword  string
	HostName    string
	DomainName  string
	DriverName  string
	PID         int
	UseKerberos bool
	Language    string
	Territory   string
	CharsetID   int
	Cid         string
}

type ConnectionConfig

type ConnectionConfig struct {
	ClientInfo
	DatabaseInfo
	SessionInfo
	AdvNegoServiceInfo
	TraceFilePath string
	TraceDir      string
	PrefetchRows  int
	Lob           LobFetch
}

func ParseConfig

func ParseConfig(dsn string) (*ConnectionConfig, error)

func (*ConnectionConfig) ConnectionData

func (config *ConnectionConfig) ConnectionData() string

type DBAPrivilege

type DBAPrivilege int
const (
	NONE      DBAPrivilege = 0
	SYSDBA    DBAPrivilege = 0x20
	SYSOPER   DBAPrivilege = 0x40
	SYSASM    DBAPrivilege = 0x00400000
	SYSBACKUP DBAPrivilege = 0x01000000
	SYSDG     DBAPrivilege = 0x02000000
	SYSKM     DBAPrivilege = 0x04000000
	SYSRAC    DBAPrivilege = 0x08000000
)

func DBAPrivilegeFromString

func DBAPrivilegeFromString(s string) DBAPrivilege

type DatabaseInfo

type DatabaseInfo struct {
	UserID   string
	Password string
	Servers  []ServerAddr

	SID             string
	ProxyClientName string
	ServiceName     string
	InstanceName    string
	DBName          string
	DBAPrivilege    DBAPrivilege
	AuthType        AuthType
	Wallet          *Wallet

	Location string
	// contains filtered or unexported fields
}

func (*DatabaseInfo) AddServer

func (info *DatabaseInfo) AddServer(server ServerAddr)

func (*DatabaseInfo) GetActiveServer

func (info *DatabaseInfo) GetActiveServer(jump bool) *ServerAddr

func (*DatabaseInfo) ResetServerIndex

func (info *DatabaseInfo) ResetServerIndex()

func (*DatabaseInfo) UpdateDatabaseInfo

func (info *DatabaseInfo) UpdateDatabaseInfo(connStr string) (err error)

func (*DatabaseInfo) UpdateDatabaseInfoForRedirect added in v2.8.20

func (info *DatabaseInfo) UpdateDatabaseInfoForRedirect(redirectAddr string, reconnectData string) error

type DialerContext

type DialerContext interface {
	DialContext(ctx context.Context, network, address string) (net.Conn, error)
}

type LobFetch

type LobFetch int
const (
	INLINE LobFetch = 0
	STREAM LobFetch = 1
)

type ServerAddr

type ServerAddr struct {
	Protocol string
	Addr     string
	Port     int
}

func ExtractServers

func ExtractServers(connStr string) (addresses []ServerAddr, err error)

func (*ServerAddr) IsEqual

func (serv *ServerAddr) IsEqual(input *ServerAddr) bool

func (*ServerAddr) NetworkAddr

func (serv *ServerAddr) NetworkAddr() string

type SessionInfo

type SessionInfo struct {
	SSLVersion            string
	Timeout               time.Duration
	EnableOOB             bool
	UnixAddress           string
	TransportDataUnitSize uint32
	SessionDataUnitSize   uint32
	Protocol              string
	SSL                   bool
	SSLVerify             bool
	TLSConfig             *tls.Config
	Dialer                DialerContext
}

func (*SessionInfo) RegisterDial added in v2.8.19

func (si *SessionInfo) RegisterDial(dialer func(ctx context.Context, network, address string) (net.Conn, error))

func (*SessionInfo) UpdateSSL

func (si *SessionInfo) UpdateSSL(server *ServerAddr) error

type Wallet

type Wallet struct {
	Certificates        [][]byte
	PrivateKeys         [][]byte
	CertificateRequests [][]byte
	// contains filtered or unexported fields
}

type CertificateData

func NewWallet

func NewWallet(filePath string) (*Wallet, error)

newWallet create new Wallet object from file path

type WalletCredential

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

Jump to

Keyboard shortcuts

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