Documentation ¶
Index ¶
- func CopyDirect(conn database.Connection, tableFName string, srcFile Connection) (cnt uint64, ok bool, err error)
- func GetTypeName(c Connection) string
- func GetTypeNameLong(c Connection) string
- type Connection
- func (c *Connection) AsDatabase() (database.Connection, error)
- func (c *Connection) AsFile() (filesys.FileSysClient, error)
- func (c *Connection) Close() error
- func (c *Connection) Context() *g.Context
- func (c *Connection) DataS(lowerCase ...bool) map[string]string
- func (c *Connection) Info() Info
- func (c *Connection) Set(m map[string]interface{})
- func (c *Connection) ToMap() map[string]interface{}
- func (c *Connection) URL() string
- type ConnectionInt
- type Info
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDirect ¶
func CopyDirect(conn database.Connection, tableFName string, srcFile Connection) (cnt uint64, ok bool, err error)
CopyDirect copies directly from cloud files (without passing through dbio)
func GetTypeNameLong ¶
func GetTypeNameLong(c Connection) string
GetTypeNameLong return the type long name
Types ¶
type Connection ¶
type Connection struct { Name string `json:"name"` Type dbio.Type `json:"type"` Data map[string]interface{} `json:"data"` // contains filtered or unexported fields }
Connection is the base connection struct
func NewConnection ¶
func NewConnection(Name string, t dbio.Type, Data map[string]interface{}) (conn Connection, err error)
NewConnection creates a new connection
func NewConnectionFromMap ¶
func NewConnectionFromMap(m map[string]interface{}) (c Connection, err error)
NewConnectionFromMap loads a Connection from a Map
func NewConnectionFromURL ¶
func NewConnectionFromURL(Name, URL string) (conn Connection, err error)
NewConnectionFromURL creates a new connection from a url
func (*Connection) AsDatabase ¶
func (c *Connection) AsDatabase() (database.Connection, error)
func (*Connection) AsFile ¶
func (c *Connection) AsFile() (filesys.FileSysClient, error)
func (*Connection) DataS ¶
func (c *Connection) DataS(lowerCase ...bool) map[string]string
DataS returns data as map[string]string
func (*Connection) Set ¶
func (c *Connection) Set(m map[string]interface{})
Set sets key/values from a map
func (*Connection) ToMap ¶
func (c *Connection) ToMap() map[string]interface{}
ToMap transforms DataConn to a Map
type ConnectionInt ¶
type ConnectionInt interface { // Self() Connection Close() error Context() g.Context Info() Info URL() string DataS(lowerCase ...bool) map[string]string ToMap() map[string]interface{} AsDatabase() (database.Connection, error) AsFile() (filesys.FileSysClient, error) // AsAPI() interface{} Set(map[string]interface{}) }
ConnectionInt is a connection
Click to show internal directories.
Click to hide internal directories.