configurations

package
v2.8.15 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 27 Imported by: 0

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
	//Tracer       trace.Tracer
	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
)

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
	// 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) 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) ([]ServerAddr, 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
	Dialer                DialerContext
}

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