sid

package
v0.53.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: Apache-2.0, BSD-3-Clause, MIT, + 1 more Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Dedicated = ServiceHandler("dedicated")
	Shared    = ServiceHandler("shared")
	Pooled    = ServiceHandler("pooled")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Protocol, Host string
	Port           int
	BufSizes
}

func (Address) IsZero

func (a Address) IsZero() bool

func (*Address) Parse

func (a *Address) Parse(ss []Statement) error

func (Address) Print

func (a Address) Print(w io.Writer, prefix, indent string)

type AddressList

type AddressList struct {
	Addresses []Address
	Options   ListOptions
}

func (AddressList) IsZero

func (al AddressList) IsZero() bool

func (*AddressList) Parse

func (al *AddressList) Parse(ss []Statement) error

func (AddressList) Print

func (al AddressList) Print(w io.Writer, prefix, indent string)

type BufSizes

type BufSizes struct {
	RecvBufSize, SendBufSize int
}

func (BufSizes) IsZero

func (bs BufSizes) IsZero() bool

func (*BufSizes) Parse

func (bs *BufSizes) Parse(ss []Statement) error

func (BufSizes) Print

func (bs BufSizes) Print(w io.Writer, prefix, indent string)

type ConnectData

type ConnectData struct {
	ServiceName, SID                      string
	GlobalName, InstanceName, RDBDatabase string
	Server                                ServiceHandler
	FailoverMode                          FailoverMode
	Hs                                    bool
}

func (ConnectData) IsZero

func (cd ConnectData) IsZero() bool

func (*ConnectData) Parse

func (cd *ConnectData) Parse(ss []Statement) error

func (ConnectData) Print

func (cd ConnectData) Print(w io.Writer, prefix, indent string)

type Description

type Description struct {
	TypeOfService string
	Security      Security
	Addresses     []Address
	AddressList   AddressList
	ConnectData   ConnectData
	Bufs          BufSizes
	SDU           int
	Options       ListOptions
	TCPKeepAlive  bool
}

func (Description) IsZero

func (d Description) IsZero() bool

func (*Description) Parse

func (d *Description) Parse(ss []Statement) error

func (Description) Print

func (d Description) Print(w io.Writer, prefix, indent string)

type DescriptionList

type DescriptionList struct {
	TypeOfService string
	Descriptions  []Description
	Options       ListOptions
}

func (*DescriptionList) Parse

func (cd *DescriptionList) Parse(ss []Statement) error

func (DescriptionList) Print

func (cd DescriptionList) Print(w io.Writer, prefix, indent string)

type FailoverMode

type FailoverMode struct {
	Backup, Type, Method string
	Retry, Delay         int
}

func (FailoverMode) IsZero

func (fo FailoverMode) IsZero() bool

func (*FailoverMode) Parse

func (fo *FailoverMode) Parse(ss []Statement) error

func (FailoverMode) Print

func (fo FailoverMode) Print(w io.Writer, prefix, indent string)

type ListOptions

type ListOptions struct {
	Failover, LoadBalance, SourceRoute bool
}

func (ListOptions) IsZero

func (lo ListOptions) IsZero() bool

func (*ListOptions) Parse

func (lo *ListOptions) Parse(ss []Statement) error

func (ListOptions) Print

func (lo ListOptions) Print(w io.Writer, prefix, indent string)

type Security

type Security struct {
	SSLServerCertDN string
}

func (Security) IsZero

func (sec Security) IsZero() bool

func (*Security) Parse

func (sec *Security) Parse(ss []Statement) error

func (Security) Print

func (sec Security) Print(w io.Writer, prefix, indent string)

type ServiceHandler

type ServiceHandler string

type Statement

type Statement struct {
	Name, Value string
	Statements  []Statement
}

Statement can Parse and Print Oracle connection descriptor (DESRIPTION=(ADDRESS=...)) format. It can be used to parse or build a SID.

See https://docs.oracle.com/cd/B28359_01/network.111/b28317/tnsnames.htm#NETRF271 or https://docs.oracle.com/en/database/oracle/oracle-database/19/netrf/local-naming-parameters-in-tns-ora-file.html#GUID-E69D27B7-2B59-4946-89B3-5DDD491C2D9A

func ParseConnDescription

func ParseConnDescription(s string) (Statement, error)

func (*Statement) Parse

func (cs *Statement) Parse(s string) (string, error)

func (Statement) Print

func (cs Statement) Print(w io.Writer, prefix, indent string)

func (Statement) String

func (cs Statement) String() string

Jump to

Keyboard shortcuts

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