sid

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2020 License: Apache-2.0, UPL-1.0 Imports: 6 Imported by: 0

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 {
	Options   ListOptions
	Addresses []Address
}

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 {
	FailoverMode                          FailoverMode
	ServiceName, SID                      string
	GlobalName, InstanceName, RDBDatabase string
	Hs                                    bool
	Server                                ServiceHandler
}

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 {
	TCPKeepAlive  bool
	SDU           int
	Bufs          BufSizes
	Options       ListOptions
	Addresses     []Address
	AddressList   AddressList
	ConnectData   ConnectData
	TypeOfService string
	Security      Security
}

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 {
	Options       ListOptions
	Descriptions  []Description
	TypeOfService string
}

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

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