aconns

package module
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2025 License: Apache-2.0 Imports: 18 Imported by: 9

README

aconns

A set of standardized interfaces and structures for managing communications in golang projects. aconns provides a unified way to handle inputs and outputs across various backends — including databases, web services, file systems, and other I/O systems.

It builds on the foundation of alibs-slim, and is designed to be composable, minimal, and dependency-aware. The core module provides abstractions, while specific implementations live in submodules.

Project Structure

This project follows a multi-module design to keep dependencies clean and modular:

  • Core
    • github.com/jpfluger/aconns — Shared types and interfaces for I/O connection abstraction.
  • Drivers
    • github.com/jpfluger/aconns/adb-pg — PostgreSQL connection implementation.
    • github.com/jpfluger/aconns/adb-mysql — MySQL connection implementation.
    • Etc...
  • Global Access
    • github.com/jpfluger/aconns/g-aconns — Loads and registers all available driver connectors.

Features

  • 🔌 Common interfaces for connecting to diverse systems
  • 📦 Self-contained driver modules with their own go.mod files
  • 🔍 Minimal core dependencies
  • 🧩 Works seamlessly with alibs-slim and the Echo Framework
  • ⚙️ Designed for testability, extensibility, and clarity

Using aconns

This project uses Go Modules. If you're using Go 1.16 or newer, module support is on by default. If needed, enable it explicitly:

export GO111MODULE=on
Importing Modules

Import only the components you need:

// Core interfaces
import "github.com/jpfluger/aconns"

// PostgreSQL support
import "github.com/jpfluger/aconns/adb-pg"

// Register all drivers at once
// import "github.com/jpfluger/aconns/g-aconns"

Versioning Strategy

Versioning is handled manually by maintainers after merge. Once changes are verified and merged into main, a version bump is applied to the core module and all subdirectory Go modules for consistency. (We aren't using git submodules.) Only actual changes to code receive a version bump. READMEs or testing modules do not receive a new version.

This ensures that consumers of g-aconns (which references multiple drivers) can depend on synchronized, tagged versions across modules.

By keeping each driver implementation in its own Go module, we avoid unnecessary dependency bloat — improving security scan accuracy and ensuring clean dependency trees.

Note: At this point in time, this strategy seems reasonable. We're open to change, if another method becomes more suitable.

Compilation Notes

  • Run go mod tidy in each module directory to manage dependencies cleanly.
  • Avoid circular dependencies between core and driver modules.
  • When building in Docker or CI, make sure to copy each go.mod and go.sum relevant to the modules you're compiling.
  • Use go install ./... carefully; it does not automatically recurse into Go subdirectory modules unless scripted.

License

aconns is licensed under the Apache License 2.0. For more details, please refer to the LICENSE file.

Documentation

Index

Constants

View Source
const (
	LOGGER_SECURITYRECORD alog.ChannelLabel = "secrec" // Security Record Channel
)
View Source
const TYPEMANAGER_CONNADAPTERS = "connadapters"

Variables

View Source
var ErrDatabaseIsEmpty = errors.New("database is empty")
View Source
var ErrHostIsEmpty = errors.New("host is empty")
View Source
var ErrNoPK = fmt.Errorf("no primary key")
View Source
var ErrPasswordIsEmpty = errors.New("password is empty")
View Source
var ErrUsernameIsEmpty = errors.New("username is empty")

Functions

func LogSecurityRecord

func LogSecurityRecord(sec RecordSecurity) error

func LogSecurityRecordWithOptions

func LogSecurityRecordWithOptions(sec RecordSecurity, doValidate bool) error

Types

type ADBAdapterBase

type ADBAdapterBase struct {
	Adapter

	Database     string `json:"database,omitempty"`
	Username     string `json:"username,omitempty"`
	Password     string `json:"password,omitempty"`
	PasswordFile string `json:"passwordFile,omitempty"` // Loaded once then deleted when the password is populated.
	// contains filtered or unexported fields
}

ADBAdapterBase holds the basic database connection information.

func (*ADBAdapterBase) GetDatabase

func (cn *ADBAdapterBase) GetDatabase() string

GetDatabase returns the database name of the database connection.

func (*ADBAdapterBase) GetPassword

func (cn *ADBAdapterBase) GetPassword() string

GetPassword returns the password of the database connection.

func (*ADBAdapterBase) GetUsername

func (cn *ADBAdapterBase) GetUsername() string

GetUsername returns the username of the database connection.

func (*ADBAdapterBase) Test

func (cn *ADBAdapterBase) Test() (bool, TestStatus, error)

Test attempts to validate the ADBAdapterBase and returns the test status and error if any.

func (*ADBAdapterBase) Validate

func (cn *ADBAdapterBase) Validate() error

Validate checks if the ADBAdapterBase object is valid.

type Adapter

type Adapter struct {
	Type AdapterType `json:"type,omitempty"`
	Name AdapterName `json:"name,omitempty"`

	//Network  string `json:"network,omitempty"`
	Host string `json:"host,omitempty"`
	Port int    `json:"port,omitempty"`
	// contains filtered or unexported fields
}

Adapter satisfies IAdapter. Use it to compose connector structs.

func (*Adapter) GetHost

func (a *Adapter) GetHost() string

GetHost returns the host of the database connection.

func (*Adapter) GetName

func (a *Adapter) GetName() AdapterName

GetName returns the AdapterName of the Adapter.

func (*Adapter) GetPort

func (a *Adapter) GetPort() int

GetPort returns the port of the database connection.

func (*Adapter) GetType

func (a *Adapter) GetType() AdapterType

GetType returns the AdapterType of the Adapter.

func (*Adapter) Test

func (a *Adapter) Test() (bool, TestStatus, error)

Test attempts to validate the Adapter and returns the test status and error if any. It uses a write lock to ensure thread-safe access.

func (*Adapter) Validate

func (a *Adapter) Validate() error

Validate checks if the Adapter is valid.

type AdapterName

type AdapterName string

AdapterName represents an adapter name

func (AdapterName) IsEmpty

func (an AdapterName) IsEmpty() bool

IsEmpty checks if the AdapterName is empty

func (AdapterName) Matches

func (an AdapterName) Matches(s string) bool

Matches checks if the AdapterName matches the given string

func (AdapterName) String

func (an AdapterName) String() string

String returns the string representation of the AdapterName

func (AdapterName) TrimSpace

func (an AdapterName) TrimSpace() AdapterName

TrimSpace returns the trimmed string representation of the AdapterName

type AdapterNames

type AdapterNames []AdapterName

AdapterNames represents a slice of AdapterName

func (AdapterNames) Find

func (ans AdapterNames) Find(an AdapterName) AdapterName

Find returns the AdapterName if found, otherwise an empty AdapterName

func (AdapterNames) HasKey

func (ans AdapterNames) HasKey(s AdapterName) bool

HasKey checks if the AdapterNames slice contains the given AdapterName

func (AdapterNames) IsEmpty

func (ans AdapterNames) IsEmpty() bool

IsEmpty checks if the AdapterNames slice is empty

func (AdapterNames) Matches

func (ans AdapterNames) Matches(s string) bool

Matches checks if any AdapterName in the AdapterNames slice matches the given string

func (AdapterNames) String

func (ans AdapterNames) String() string

String returns the string representation of the AdapterNames slice

func (AdapterNames) ToStringArray

func (ans AdapterNames) ToStringArray() []string

ToStringArray returns an array of AdapterNames as strings

type AdapterType

type AdapterType string

AdapterType represents an adapter type

func (AdapterType) IsEmpty

func (at AdapterType) IsEmpty() bool

IsEmpty checks if the AdapterType is empty

func (AdapterType) Matches

func (at AdapterType) Matches(s string) bool

Matches checks if the AdapterType matches the given string

func (AdapterType) String

func (at AdapterType) String() string

String returns the string representation of the AdapterType

func (AdapterType) ToStringTrimLower

func (at AdapterType) ToStringTrimLower() string

ToStringTrimLower returns the trimmed and lowercased string representation of the AdapterType

func (AdapterType) TrimSpace

func (at AdapterType) TrimSpace() AdapterType

TrimSpace returns the trimmed string representation of the AdapterType

func (AdapterType) Validate

func (at AdapterType) Validate() error

Validate checks if the AdapterType is valid

type AdapterTypes

type AdapterTypes []AdapterType

AdapterTypes represents a slice of AdapterType

func (AdapterTypes) Find

func (ats AdapterTypes) Find(at AdapterType) AdapterType

Find returns the AdapterType if found, otherwise an empty AdapterType

func (AdapterTypes) HasKey

func (ats AdapterTypes) HasKey(s AdapterType) bool

HasKey checks if the AdapterTypes slice contains the given AdapterType

func (AdapterTypes) IsEmpty

func (ats AdapterTypes) IsEmpty() bool

IsEmpty checks if the AdapterTypes slice is empty

func (AdapterTypes) Matches

func (ats AdapterTypes) Matches(s string) bool

Matches checks if any AdapterType in the AdapterTypes slice matches the given string

func (AdapterTypes) String

func (ats AdapterTypes) String() string

String returns the string representation of the AdapterTypes slice

func (AdapterTypes) ToStringArray

func (ats AdapterTypes) ToStringArray() []string

ToStringArray returns an array of AdapterTypes as strings

type Conn

type Conn struct {
	Ignore      bool     `json:"ignore,omitempty"`      // Ignore flag for the connection.
	Id          ConnId   `json:"id,omitempty"`          // Unique identifier for the connection.
	Description string   `json:"description,omitempty"` // Optional description for the connection.
	Adapter     IAdapter `json:"adapter,omitempty"`     // Adapter associated with the connection.

	// Optional
	IsRequired  bool `json:"isRequired,omitempty"`  // If true, then this adapter is required.
	IsBootstrap bool `json:"isBootstrap,omitempty"` // If true, then this adapter is required during boot.
	// contains filtered or unexported fields
}

Conn struct represents a connection with an adapter.

func (*Conn) DoIgnore

func (c *Conn) DoIgnore() bool

DoIgnore returns the Ignore flag of the connection.

func (*Conn) GetAdapter

func (c *Conn) GetAdapter() IAdapter

GetAdapter returns the Adapter of the connection.

func (*Conn) GetId

func (c *Conn) GetId() ConnId

GetId returns the Id of the connection.

func (*Conn) GetIsBootstrap

func (c *Conn) GetIsBootstrap() bool

GetIsBootstrap returns the IsBootstrap flag of the connection.

func (*Conn) GetIsRequired

func (c *Conn) GetIsRequired() bool

GetIsRequired returns the IsRequired flag of the connection.

func (*Conn) Test

func (c *Conn) Test() (bool, TestStatus, error)

Test attempts to establish the connection and handles failures based on IsRequired and IsBootstrap flags.

func (*Conn) TestBootstrap

func (c *Conn) TestBootstrap() (bool, TestStatus, error)

TestBootstrap attempts to establish the connection if it is marked as bootstrap.

func (*Conn) TestRequired

func (c *Conn) TestRequired() (bool, TestStatus, error)

TestRequired attempts to establish the connection if it is marked as required.

func (*Conn) UnmarshalJSON

func (c *Conn) UnmarshalJSON(data []byte) error

UnmarshalJSON is a custom unmarshaller for Conn that handles IAdapter. It unmarshals the JSON data into the Conn struct and its Adapter.

func (*Conn) Validate

func (c *Conn) Validate() error

Validate checks if the Conn is valid. It ensures the adapter is not nil and validates the adapter. If the Id is not set, it auto-assigns a new UUID.

type ConnActionMap

type ConnActionMap map[ConnActionType]*ConnSystemItem

ConnActionMap is a map of ConnActionType to ConnSystemItem.

func NewConnActionMap

func NewConnActionMap() ConnActionMap

NewConnActionMap creates a new ConnActionMap with default ConnSystemItems.

func (ConnActionMap) GetItem

func (cvm ConnActionMap) GetItem(cvType ConnActionType) *ConnSystemItem

GetItem returns the ConnSystemItem for the given ConnActionType, or nil if it does not exist.

func (ConnActionMap) HasSqlText

func (cvm ConnActionMap) HasSqlText(cvType ConnActionType) bool

HasSqlText checks if the ConnSystemItem for the given ConnActionType has non-empty text.

func (ConnActionMap) MustGetItem

func (cvm ConnActionMap) MustGetItem(cvType ConnActionType) *ConnSystemItem

MustGetItem returns the ConnSystemItem for the given ConnActionType, creating a new one if it does not exist.

func (ConnActionMap) Validate

func (cvm ConnActionMap) Validate() error

Validate checks if the ConnActionMap is valid.

type ConnActionType

type ConnActionType string

ConnActionType represents an adapter type.

const (
	CONNACTIONTYPE_CREATE     ConnActionType = "CREATE"
	CONNACTIONTYPE_UPGRADE    ConnActionType = "UPGRADE"
	CONNACTIONTYPE_DOWNGRADE  ConnActionType = "DOWNGRADE"
	CONNACTIONTYPE_DELETE     ConnActionType = "DELETE"
	CONNACTIONTYPE_NOOP_EQUAL ConnActionType = "no-op-equal" // expect no-operation to be performed because DB is in an equal state
)

func (ConnActionType) IsEmpty

func (csa ConnActionType) IsEmpty() bool

IsEmpty checks if the ConnActionType is empty.

func (ConnActionType) Matches

func (csa ConnActionType) Matches(s string) bool

Matches checks if the ConnActionType matches the given string.

func (ConnActionType) String

func (csa ConnActionType) String() string

String returns the string representation of the ConnActionType.

func (ConnActionType) ToStringTrimLower

func (csa ConnActionType) ToStringTrimLower() string

ToStringTrimLower returns the trimmed and lowercased string representation of the ConnActionType.

func (ConnActionType) TrimSpace

func (csa ConnActionType) TrimSpace() ConnActionType

TrimSpace returns the trimmed string representation of the ConnActionType.

func (ConnActionType) Validate

func (csa ConnActionType) Validate() error

Validate checks if the ConnActionType is valid.

type ConnActionTypes

type ConnActionTypes []ConnActionType

ConnActionTypes represents a slice of ConnActionType.

func (ConnActionTypes) Find

Find returns the ConnActionType if found, otherwise an empty ConnActionType.

func (ConnActionTypes) HasKey

func (csas ConnActionTypes) HasKey(s ConnActionType) bool

HasKey checks if the ConnActionTypes slice contains the given ConnActionType.

func (ConnActionTypes) IsEmpty

func (csas ConnActionTypes) IsEmpty() bool

IsEmpty checks if the ConnActionTypes slice is empty.

func (ConnActionTypes) Matches

func (csas ConnActionTypes) Matches(s string) bool

Matches checks if any ConnActionType in the ConnActionTypes slice matches the given string.

func (ConnActionTypes) String

func (csas ConnActionTypes) String() string

String returns the string representation of the ConnActionTypes slice.

func (ConnActionTypes) ToStringArray

func (csas ConnActionTypes) ToStringArray() []string

ToStringArray returns an array of ConnActionTypes as strings.

type ConnId

type ConnId struct {
	uuid.NullUUID
}

ConnId represents a unique service identifier.

func NewConnId

func NewConnId() ConnId

NewConnId creates a new ConnId with a non-nil value using NewNullUUIDWithValue.

func ParseConnId

func ParseConnId(target string) ConnId

ParseConnId parses a string into a ConnId using ParseNullUUID.

func ToConnIdFromUUID

func ToConnIdFromUUID(id uuid.UUID) ConnId

ToConnIdFromUUID creates a new UID with a non-nil value using NewNullUUIDWithValue.

func (*ConnId) FromString

func (sid *ConnId) FromString(input string) error

FromString parses a string and assigns the ConnId to itself.

func (ConnId) HasMatch

func (sid ConnId) HasMatch(target ConnId) bool

HasMatch checks if the ConnId matches the provided ConnId.

func (ConnId) IsNil

func (sid ConnId) IsNil() bool

IsNil checks if the ConnId is nil or invalid.

func (ConnId) MarshalJSON

func (sid ConnId) MarshalJSON() ([]byte, error)

MarshalJSON ensures that nil ConnIds are marshaled as null.

func (ConnId) MarshalText

func (sid ConnId) MarshalText() ([]byte, error)

MarshalText converts the ConnId to its string representation for text-based encoding.

func (ConnId) MatchesOne

func (sid ConnId) MatchesOne(targets ...ConnId) bool

MatchesOne checks if the ConnId matches any of the provided ConnIds.

func (ConnId) String

func (sid ConnId) String() string

String converts the ConnId to its string representation.

func (*ConnId) UnmarshalJSON

func (sid *ConnId) UnmarshalJSON(data []byte) error

UnmarshalJSON parses a ConnId from a JSON string, handling "null" or empty values.

func (*ConnId) UnmarshalText

func (sid *ConnId) UnmarshalText(text []byte) error

UnmarshalText parses a ConnId from a plain text string.

type ConnIds

type ConnIds []ConnId

ConnIds represents a collection of ConnId values.

func (ConnIds) Append

func (sids ConnIds) Append(id ConnId, allowDuplicates bool) ConnIds

Append adds a ConnId to the slice. Optionally prevents duplicates if allowDuplicates is false.

func (ConnIds) Clean

func (sids ConnIds) Clean() ConnIds

Clean removes empty (nil) records from ConnIds.

func (ConnIds) Contains

func (sids ConnIds) Contains(sid ConnId) bool

Contains checks if the slice contains the given ConnId.

func (ConnIds) Filter

func (sids ConnIds) Filter(predicate func(ConnId) bool) ConnIds

Filter creates a new slice containing only ConnIds that match the given predicate.

func (ConnIds) IsValid

func (sids ConnIds) IsValid(targets ...ConnId) bool

IsValid checks if all given ConnIds exist in the ConnIds slice.

func (ConnIds) Merge

func (sids ConnIds) Merge(other ConnIds) ConnIds

Merge combines two ConnIds slices, removing duplicates.

func (ConnIds) Remove

func (sids ConnIds) Remove(target ConnId) ConnIds

Remove creates a new slice that excludes the specified ConnId.

type ConnSystemHelper

type ConnSystemHelper struct {
	ActionMap   ConnActionMap   `json:"actionMap"`
	Action      ConnActionType  `json:"action"`
	FromVersion *semver.Version `json:"fromVersion,omitempty"`
	ToVersion   *semver.Version `json:"toVersion,omitempty"`
}

func (*ConnSystemHelper) GetAction

func (sb *ConnSystemHelper) GetAction() ConnActionType

func (*ConnSystemHelper) GetFromVersion

func (sb *ConnSystemHelper) GetFromVersion() semver.Version

func (*ConnSystemHelper) GetMap

func (sb *ConnSystemHelper) GetMap() ConnActionMap

func (*ConnSystemHelper) GetToVersion

func (sb *ConnSystemHelper) GetToVersion() semver.Version

func (*ConnSystemHelper) HasFromVersion

func (sb *ConnSystemHelper) HasFromVersion() bool

func (*ConnSystemHelper) HasToVersion

func (sb *ConnSystemHelper) HasToVersion() bool

func (*ConnSystemHelper) IsCreate

func (sb *ConnSystemHelper) IsCreate() bool

func (*ConnSystemHelper) IsDelete

func (sb *ConnSystemHelper) IsDelete() bool

func (*ConnSystemHelper) IsDowngrade

func (sb *ConnSystemHelper) IsDowngrade() bool

func (*ConnSystemHelper) IsUpgrade

func (sb *ConnSystemHelper) IsUpgrade() bool

func (*ConnSystemHelper) MustGet

func (sb *ConnSystemHelper) MustGet(action ConnActionType) string

func (*ConnSystemHelper) MustGetByAction

func (sb *ConnSystemHelper) MustGetByAction() string

func (*ConnSystemHelper) MustGetCreate

func (sb *ConnSystemHelper) MustGetCreate() string

func (*ConnSystemHelper) MustGetDelete

func (sb *ConnSystemHelper) MustGetDelete() string

func (*ConnSystemHelper) MustGetDowngrade

func (sb *ConnSystemHelper) MustGetDowngrade() string

func (*ConnSystemHelper) MustGetUpgrade

func (sb *ConnSystemHelper) MustGetUpgrade() string

type ConnSystemItem

type ConnSystemItem struct {
	DoSkip bool   `json:"doSkip,omitempty"` // Flag to indicate if the item should be skipped.
	Text   string `json:"text,omitempty"`   // Text content of the item.
	// contains filtered or unexported fields
}

ConnSystemItem represents an item with versioning information.

func (*ConnSystemItem) UnpackImportWithMacroDirective

func (cvi *ConnSystemItem) UnpackImportWithMacroDirective(dirOptions string) error

UnpackImportWithMacroDirective processes the macro directive for importing content. If the text begins with "#igorg-do-import:", it reads the content from the specified file path.

func (*ConnSystemItem) Validate

func (cvi *ConnSystemItem) Validate() error

Validate checks if the ConnSystemItem is valid.

type DbColumnName

type DbColumnName string

DbColumnName is a type that represents a database column name.

func (DbColumnName) Bytes

func (cn DbColumnName) Bytes() []byte

Bytes converts the DbColumnName to a slice of bytes.

func (DbColumnName) IsEmpty

func (cn DbColumnName) IsEmpty() bool

IsEmpty checks if the DbColumnName is empty after trimming whitespace.

func (DbColumnName) String

func (cn DbColumnName) String() string

String converts the DbColumnName to a regular string.

func (DbColumnName) TrimSpace

func (cn DbColumnName) TrimSpace() DbColumnName

TrimSpace returns a new DbColumnName with leading and trailing whitespace removed.

type DbColumnNames

type DbColumnNames []DbColumnName

DbColumnNames is a slice of DbColumnName that represents a list of database column names.

func NewDbColumnNames

func NewDbColumnNames(names ...DbColumnName) DbColumnNames

NewDbColumnNames creates a new DbColumnNames slice from a variadic list of DbColumnName.

func (DbColumnNames) Add

func (cns DbColumnNames) Add(names ...DbColumnName) DbColumnNames

Add appends non-duplicate DbColumnNames to the slice.

func (DbColumnNames) Ensure

func (cns DbColumnNames) Ensure(names ...DbColumnName) DbColumnNames

Ensure ensures that the given DbColumnNames are present in the slice. It's an alias for the Add method for better readability.

func (DbColumnNames) Find

func (cns DbColumnNames) Find(name DbColumnName) DbColumnName

Find searches for a DbColumnName in the slice and returns it if found.

func (DbColumnNames) Has

func (cns DbColumnNames) Has(name DbColumnName) bool

Has checks if a DbColumnName exists in the slice.

func (DbColumnNames) Length

func (cns DbColumnNames) Length() int

Length returns the number of DbColumnName in the slice.

func (DbColumnNames) Remove

func (cns DbColumnNames) Remove(names ...DbColumnName) DbColumnNames

Remove deletes the specified DbColumnNames from the slice.

type IAdapter

type IAdapter interface {
	GetType() AdapterType
	GetName() AdapterName
	GetHost() string
	GetPort() int
	Validate() error
	Test() (ok bool, testStatus TestStatus, err error)
}

IAdapter interface defines the methods that an adapter should implement.

type IAdapterDB

type IAdapterDB interface {
	IAdapter
	GetDatabase() string
	GetUsername() string
	GetPassword() string
	Validate() error
	Test() (bool, TestStatus, error)
}

IAdapterDB interface extends IAdapter with additional database-related methods.

type IAdapterMap

type IAdapterMap map[AdapterName]IAdapter

IAdapterMap is a map of IAdapter with AdapterName as the key.

func (IAdapterMap) Get

func (m IAdapterMap) Get(name AdapterName) (IAdapter, bool)

Get retrieves an IAdapter by its AdapterName.

func (IAdapterMap) Remove

func (m IAdapterMap) Remove(name AdapterName)

Remove deletes an IAdapter from the map by its AdapterName.

func (IAdapterMap) Set

func (m IAdapterMap) Set(name AdapterName, adapter IAdapter)

Set adds or updates an IAdapter in the map.

func (IAdapterMap) ToArray

func (m IAdapterMap) ToArray() IAdapters

ToArray converts the IAdapterMap to an array of IAdapters.

type IAdapters

type IAdapters []IAdapter

IAdapters is a slice of IAdapter.

func (IAdapters) ToMap

func (adapters IAdapters) ToMap() IAdapterMap

ToMap converts the IAdapters to an IAdapterMap.

type IConn

type IConn interface {
	DoIgnore() bool
	GetId() ConnId
	GetAdapter() IAdapter
	GetIsRequired() bool
	GetIsBootstrap() bool
	Validate() error
}

IConn interface defines the methods that a connection should implement.

type IConnMap

type IConnMap map[ConnId]IConn

IConnMap is a map of IConn with UUID as the key.

func (IConnMap) Get

func (m IConnMap) Get(id ConnId) (IConn, bool)

Get retrieves an IConn by its UUID.

func (IConnMap) Remove

func (m IConnMap) Remove(id ConnId)

Remove deletes an IConn from the map by its UUID.

func (IConnMap) Set

func (m IConnMap) Set(id ConnId, conn IConn)

Set adds or updates an IConn in the map.

func (IConnMap) ToAdapterArray

func (m IConnMap) ToAdapterArray() IAdapters

ToAdapterArray converts the IConnMap to an array of IAdapters.

func (IConnMap) ToAdapterMap

func (m IConnMap) ToAdapterMap() IAdapterMap

ToAdapterMap converts the IConnMap to an IAdapterMap.

func (IConnMap) ToArray

func (m IConnMap) ToArray() IConns

ToArray converts the IConnMap to an array of IConns.

type IConns

type IConns []IConn

func (IConns) FindByAdapterName

func (conns IConns) FindByAdapterName(name AdapterName) (IAdapter, bool)

FindByAdapterName finds an IAdapter by its name.

func (IConns) FindByConnId

func (conns IConns) FindByConnId(id ConnId) (IConn, bool)

FindByConnId finds an IConn by its UUID.

func (IConns) FindConnByAdapterName

func (conns IConns) FindConnByAdapterName(name AdapterName) (IConn, bool)

FindConnByAdapterName finds an IConn by the adapter name.

func (IConns) Get

func (conns IConns) Get(id ConnId) (IConn, bool)

Get retrieves an IConn by its UUID.

func (IConns) GetConnCounts

func (conns IConns) GetConnCounts() (cTotal int, cIgnore int, cBootstrap int, cIsRequired int)

func (*IConns) Remove

func (conns *IConns) Remove(id ConnId)

Remove deletes an IConn from the slice by its UUID.

func (*IConns) Set

func (conns *IConns) Set(conn IConn)

Set adds or updates an IConn in the slice.

func (IConns) ToAdapterArray

func (conns IConns) ToAdapterArray() IAdapters

ToAdapterArray converts the IConns to an array of IAdapters.

func (IConns) ToAdapterMap

func (conns IConns) ToAdapterMap() IAdapterMap

ToAdapterMap converts the IConns to an IAdapterMap.

func (IConns) ToMap

func (conns IConns) ToMap() IConnMap

ToMap converts the IConns to an IConnMap.

func (*IConns) UnmarshalJSON

func (conns *IConns) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals JSON data into a slice of Conn structs.

type IImportRecordWrapper

type IImportRecordWrapper interface {
	GetDirImports() string
	GetRecImportOnExistsType() RecImportOnExistsType
	GetModifiedDate() time.Time
	GetTag(key atags.TagKey) *atags.TagKeyValueString
}

type IRecordAction

type IRecordAction interface {
	// Import is required for imports to work.
	// Notice the function returns "ImportRecordResults". This must
	// be true for a single object or for an array of objects.
	// Why? When the object is created from model type in the import
	// function, the same "Import" function is run regardless if the
	// object is a single object or an array of objects. The array of
	// objects would normally and naturally return "ImportRecordResults"
	// but a single object would naturually return a single "ImportRecordResult".
	// Although the implementation is counter-intuitive, it makes sense
	// from a single interface implementation since both a single object
	// and array of objects are treated the same.
	Import(ri *RI, irw IImportRecordWrapper) (ImportRecordResults, error)
}

type IRecordModel

type IRecordModel interface {
	IRecordAction

	Insert(ri *RI) error
	Update(ri *RI) error
	Upsert(ri *RI) error
	Select(ri *RI) error

	SelectIntoNewObject(ri *RI) (IRecordModel, error)
	GetRecordSecurity() RecordSecurity
	GetPrimaryKeyAsString() string
}

IRecordModel is used to reduce "mostly" repeatable code within object models-tenants. An example can be found when inheriting pg/pg-model-base.go and running OnImportRunAction

type ISBAdapter

type ISBAdapter interface {
	GetType() AdapterType
	GetName() AdapterName
	GetHost() string
}

ISBAdapter interface defines the sandboxed interface implementation of IAdapter.

type ISBAdapterHelper

type ISBAdapterHelper interface {
	GetMap() ConnSystemHelper
	CheckVersionState() ConnActionType
	IsCreate() bool
	IsUpgrade() bool
	IsDowngrade() bool
	IsDelete() bool
	HasFromVersion() bool
	HasToVersion() bool
	GetFromVersion() semver.Version
	GetToVersion() semver.Version
	MustGetByAction() string
	MustGetCreate() string
	MustGetUpgrade() string
	MustGetDowngrade() string
	MustGetDelete() string
	MustGet(action ConnActionType) string
}

type ISBAdapterSql

type ISBAdapterSql interface {
	ISBAdapter

	// SupportsModels returns 'true' if Model(s) are supported,
	// otherwise use Query to return a RowScanner.
	SupportsModels() bool

	// Query operates similar to "database/sql".
	Query(query string) (ISBAdapterSqlRows, error)
	QueryArgs(query string, args ...interface{}) (ISBAdapterSqlRows, error)

	// QueryModel operates similar to "github.com/uptrace/bun".
	QueryModel(query string, model interface{}) error
	QueryModelArgs(query string, model interface{}, args ...interface{}) error
}

ISBAdapterSql is for sandboxed adapters with SQL capability.

type ISBAdapterSqlMap

type ISBAdapterSqlMap interface {
	ISBAdapterSql

	// RunCommand runs an exe command against the data source.
	RunCommand(text string) error
	RunMapByAction() error
	RunMapAction(action ConnActionType) error
	GetAdapterHelper() ISBAdapterHelper
}

ISBAdapterSqlMap is for aconns with sql capability and added mapping component to predefined sql.

type ISBAdapterSqlRows

type ISBAdapterSqlRows interface {
	StartTimer()
	EndTimer() time.Duration
	GetTimerDuration() time.Duration
	Next() bool
	Close() error
	Scan(dest ...any) error
}

ISBAdapterSqlRows defines the interface for SQL rows with timing functionality.

type ImportRecordResult

type ImportRecordResult struct {
	Id           string    `json:"id,omitempty"`
	ImportedDate time.Time `json:"importedDate,omitempty"`
	Error        error     `json:"error,omitempty"`
}

type ImportRecordResults

type ImportRecordResults []*ImportRecordResult

func NewImportRecordResults

func NewImportRecordResults(id string, err error) ImportRecordResults

type Manager

type Manager struct {
	Conns IConns `json:"conns,omitempty"`
	// In a sandbox situation, set LimitAccess to true, which indicates
	// to the manager to only allow operations that can be run safely and
	// specifically inside the sandbox.
	LimitAccess bool `json:"limitAccess,omitempty"`
}

Manager is used as the basis for interacting with Connections. Use cases can vary. In an SaaS application, consider initializing a single Manager as a global, while any client-specific conns are initialized separately with their own Manager instance. Depending upon your app requirements, you may need to copy and modify this structure to suit your needs. This struct is designed to be compliant for applications that need to run scripts in a sandboxed environment with options to limit client access.

func NewManager

func NewManager() *Manager

NewManager creates a new Manager instance.

func (*Manager) FindAdapter

func (m *Manager) FindAdapter(name AdapterName) IAdapter

FindAdapter finds an IAdapter by its name.

func (*Manager) FindConn

func (m *Manager) FindConn(id ConnId) IConn

FindConn finds an IConn by its UUID.

func (*Manager) HasConns

func (m *Manager) HasConns() bool

HasConns checks if the Manager has any connections.

func (*Manager) Test

func (m *Manager) Test(failQuiet bool) error

Test both validates and opens a connection, testing it. If an adapter uses connection pools, they are initialized here.

func (*Manager) Validate

func (m *Manager) Validate() error

Validate checks the syntax of all connections in the queue.

func (*Manager) ValidateBootstrap

func (m *Manager) ValidateBootstrap() error

ValidateBootstrap ensures expected connections can be tried early in a SaaS-style application.

func (*Manager) ValidateRequired

func (m *Manager) ValidateRequired() error

ValidateRequired ensures required connections can be tried during normal boot.

func (*Manager) ValidateWithOptions

func (m *Manager) ValidateWithOptions(checkIsBootstrap bool, checkIsRequired bool) error

ValidateWithOptions validates connections based on bootstrap and required flags.

type RI

type RI struct {
	// A ConnId or AdapterName is required.
	ConnId      ConnId
	AdapterName AdapterName

	// The user identifier to use when created a RecordSecurity for any given action.
	// This could be a username, email or id.
	User auser.RecordUserIdentity

	// If used, the event property describes the reason why the action took place.
	// For example, this value is set to "import" for bulk imports.
	// It could be made more granular (eg import from /path/to/file)
	Event string
	// contains filtered or unexported fields
}

RI is the Record Initializer structure.

func NewRI

func NewRI(connId ConnId) *RI

func NewRIAdapter

func NewRIAdapter(adapterName AdapterName) *RI

func NewRISEC

func NewRISEC(connId ConnId, user auser.RecordUserIdentity) *RI

func NewRISECAdapter

func NewRISECAdapter(adapterName AdapterName, user auser.RecordUserIdentity) *RI

func NewRIWithOptions

func NewRIWithOptions(connId ConnId, adapterName AdapterName, user auser.RecordUserIdentity, event string) *RI

func (*RI) GetAdapterName

func (ri *RI) GetAdapterName() AdapterName

func (*RI) GetConnId

func (ri *RI) GetConnId() ConnId

func (*RI) GetEvent

func (ri *RI) GetEvent() string

func (*RI) GetRecordSecurity

func (ri *RI) GetRecordSecurity(action RecordActionType, target *RecordSecurity) (*RecordSecurity, error)

func (*RI) GetUser

func (ri *RI) GetUser() auser.RecordUserIdentity

func (*RI) NewRI

func (ri *RI) NewRI() *RI

func (*RI) NewRISEC

func (ri *RI) NewRISEC() *RI

func (*RI) NewRISECUser

func (ri *RI) NewRISECUser(user auser.RecordUserIdentity) *RI

func (*RI) SetNoApplyHistory

func (ri *RI) SetNoApplyHistory(noApplyHistory bool)

func (*RI) SetRecordSecurity

func (ri *RI) SetRecordSecurity(sec *RecordSecurity)

type RecImportOnExistsType

type RecImportOnExistsType int
const (
	REC_IMPORT_ON_EXISTS_IGNORE RecImportOnExistsType = iota
	REC_IMPORT_ON_EXISTS_UPDATE
	REC_IMPORT_ON_EXISTS_UPDATE_IF_NEWER
)

These values work in conjunction with those on individual records. The logic is as follows:

  1. Examine the record for a ModifiedTime and RecImportOnExistsType value. a. If the ModifiedTime is valid, then use this one for instructions. b. If the ModifiedTime is invalid, then proceed to 2.
  2. Use the RecImportOnExistsType value from RecordImport and the ModifiedDate from RecordImportsWrapper to make the import decision. --> a sophisticated program might employ a conflict manager to allow or disallow updates.

type RecordActionType

type RecordActionType string

RecordActionType represents the type of action performed on a database record.

const (
	// Actions that typically require a username.
	REC_ACTION_INSERT RecordActionType = "insert" // Insert a new record.
	REC_ACTION_UPDATE RecordActionType = "update" // Update an existing record.
	REC_ACTION_DELETE RecordActionType = "delete" // Delete a record.
	REC_ACTION_UPSERT RecordActionType = "upsert" // Insert or update a record.

	// Events that do not require a username.
	REC_EVENT_IMPORT   RecordActionType = "import"   // Import records in bulk.
	REC_EVENT_ADMINFIX RecordActionType = "adminfix" // Administrative fixes to records.
)

Constants for RecordActionType values.

func (RecordActionType) IsEmpty

func (rt RecordActionType) IsEmpty() bool

IsEmpty checks if the RecordActionType is empty after trimming whitespace.

func (RecordActionType) String

func (rt RecordActionType) String() string

String converts the RecordActionType to a regular string.

func (RecordActionType) TrimSpace

func (rt RecordActionType) TrimSpace() RecordActionType

TrimSpace returns a new RecordActionType with leading and trailing whitespace removed.

type RecordIdentifierMeta

type RecordIdentifierMeta struct {
	Type RecordIdentifierType `json:"type" jsonschema:"type=string,title=Identifier Type,description=The type of identifier,example=Email"`
	Id   string               `json:"id" jsonschema:"type=string,title=Identifier Value,description=The value of the identifier,example=bob@example.com"`
}

RecordIdentifierMeta represents a single identifier for a user.

func NewRecordIdentifierMeta

func NewRecordIdentifierMeta(recIdType RecordIdentifierType, id string) *RecordIdentifierMeta

NewRecordIdentifierMeta creates a new RecordIdentifierMeta instance.

func (*RecordIdentifierMeta) HasMatch

func (rid *RecordIdentifierMeta) HasMatch(other *RecordIdentifierMeta) bool

HasMatch checks if the current RecordIdentifierMeta matches another.

func (*RecordIdentifierMeta) HasMatchWithTypeId

func (rid *RecordIdentifierMeta) HasMatchWithTypeId(recIdType RecordIdentifierType, id string) bool

HasMatchWithTypeId checks if the RecordIdentifierMeta matches a given type and ID.

func (*RecordIdentifierMeta) Validate

func (rid *RecordIdentifierMeta) Validate() error

Validate validates the RecordIdentifierMeta fields.

type RecordIdentifierMetas

type RecordIdentifierMetas []*RecordIdentifierMeta

RecordIdentifierMetas represents a list of RecordIdentifierMeta objects.

func (RecordIdentifierMetas) Filter

func (rids RecordIdentifierMetas) Filter(predicate func(label *RecordIdentifierMeta) bool) RecordIdentifierMetas

Filter filters the RecordIdentifierMetas collection by a custom predicate.

func (RecordIdentifierMetas) FindById

FindById finds a RecordIdentifierMeta strictly by its ID.

func (RecordIdentifierMetas) FindByType

FindByType finds a RecordIdentifierMeta by its Type, ignoring ID.

func (RecordIdentifierMetas) FindByTypeAndId

func (rids RecordIdentifierMetas) FindByTypeAndId(recIdType RecordIdentifierType, id string) *RecordIdentifierMeta

FindByTypeAndId finds a RecordIdentifierMeta by its Type and ID.

func (RecordIdentifierMetas) FindExactMatch

func (rids RecordIdentifierMetas) FindExactMatch(target *RecordIdentifierMeta) *RecordIdentifierMeta

FindExactMatch finds a RecordIdentifierMeta that matches exactly (Type and ID).

func (RecordIdentifierMetas) FindWithMatchingOptions

func (rids RecordIdentifierMetas) FindWithMatchingOptions(target *RecordIdentifierMeta, matchByType bool, matchById bool) *RecordIdentifierMeta

FindWithMatchingOptions finds a RecordIdentifierMeta using flexible matching options.

func (RecordIdentifierMetas) HasExactMatch

func (rids RecordIdentifierMetas) HasExactMatch(target *RecordIdentifierMeta) bool

func (RecordIdentifierMetas) HasMatch

func (rids RecordIdentifierMetas) HasMatch(targets ...*RecordIdentifierMeta) bool

func (RecordIdentifierMetas) HasMatchByTypeId

func (rids RecordIdentifierMetas) HasMatchByTypeId(recIdType RecordIdentifierType, id string) bool

func (RecordIdentifierMetas) HasMatchByTypeIdByType

func (rids RecordIdentifierMetas) HasMatchByTypeIdByType(recIdType RecordIdentifierType, id string) bool

func (RecordIdentifierMetas) HasMatchByTypeOnly

func (rids RecordIdentifierMetas) HasMatchByTypeOnly(recIdType RecordIdentifierType) bool

func (RecordIdentifierMetas) HasMatchWithOptions

func (rids RecordIdentifierMetas) HasMatchWithOptions(target *RecordIdentifierMeta, matchByLabel bool) bool

HasMatchWithOptions checks if the RecordIdentifierMetas array contains a match based on flexible criteria.

func (RecordIdentifierMetas) RemoveById

RemoveById removes a RecordIdentifierMeta by ID only.

func (RecordIdentifierMetas) RemoveByType

RemoveByType removes a RecordIdentifierMeta by Type only.

func (RecordIdentifierMetas) RemoveByTypeAndId

func (rids RecordIdentifierMetas) RemoveByTypeAndId(recIdType RecordIdentifierType, id string) (RecordIdentifierMetas, error)

RemoveByTypeAndId removes a RecordIdentifierMeta by Type and ID.

func (RecordIdentifierMetas) RemoveExact

RemoveExact removes a RecordIdentifierMeta by exact match (Type and ID).

func (RecordIdentifierMetas) RemoveWithOptions

func (rids RecordIdentifierMetas) RemoveWithOptions(target *RecordIdentifierMeta, matchByType bool, matchById bool) (RecordIdentifierMetas, error)

RemoveWithOptions removes a RecordIdentifierMeta with flexible matching options.

func (RecordIdentifierMetas) Set

Set adds or updates a RecordIdentifierMeta without considering type-based or ID-based matching.

func (RecordIdentifierMetas) SetById

SetById adds or updates a RecordIdentifierMeta by ID only.

func (RecordIdentifierMetas) SetByType

SetByType adds or updates a RecordIdentifierMeta by matching based on type only.

func (RecordIdentifierMetas) SetByTypeAndId

func (rids RecordIdentifierMetas) SetByTypeAndId(recIdType RecordIdentifierType, id string) (RecordIdentifierMetas, error)

SetByTypeAndId adds or updates a RecordIdentifierMeta by type and ID, matching both.

func (RecordIdentifierMetas) SetWithOptions

func (rids RecordIdentifierMetas) SetWithOptions(target *RecordIdentifierMeta, matchByType bool, matchById bool) (RecordIdentifierMetas, error)

SetWithOptions adds or updates a RecordIdentifierMeta in the RecordIdentifierMetas array with flexible matching options.

type RecordIdentifierType

type RecordIdentifierType string

RecordIdentifierType represents the type of action performed on a database record.

const (
	REC_ID_USER  RecordIdentifierType = "user"
	REC_ID_EMAIL RecordIdentifierType = "email"
	REC_ID_PHONE RecordIdentifierType = "phone"
)

Constants for RecordIdentifierType values.

func (RecordIdentifierType) IsEmpty

func (rt RecordIdentifierType) IsEmpty() bool

IsEmpty checks if the RecordIdentifierType is empty after trimming whitespace.

func (RecordIdentifierType) IsValid

func (rt RecordIdentifierType) IsValid() bool

IsValid checks if the RecordIdentifierType is one of the allowed constants.

func (RecordIdentifierType) String

func (rt RecordIdentifierType) String() string

String converts the RecordIdentifierType to a regular string.

func (RecordIdentifierType) TrimSpace

TrimSpace returns a new RecordIdentifierType with leading and trailing whitespace removed.

type RecordIdentifierTypes

type RecordIdentifierTypes []RecordIdentifierType

func RECIDENTIFIERS

func RECIDENTIFIERS() RecordIdentifierTypes

func (RecordIdentifierTypes) HasMatch

func (rts RecordIdentifierTypes) HasMatch(recIdType RecordIdentifierType) bool

type RecordSecurity

type RecordSecurity struct {
	User    auser.RecordUserIdentity   `json:"user,omitempty"`
	Action  RecordActionType           `json:"action,omitempty"`
	Event   string                     `json:"event,omitempty"`
	Time    time.Time                  `json:"time,omitempty"`
	History RecordSecurityHistoryTimes `json:"history,omitempty"`
	Error   *aerr.Error                `json:"error,omitempty"`
	RecIds  atags.TagArrStrings        `json:"recIds,omitempty"`
	Meta    json.RawMessage            `json:"meta,omitempty"`
}

RecordSecurity is used for tracking the security-related changes and actions performed on a database record. It includes the user who performed the action, the action itself, and a history of past actions.

func NewRecordSecurity

func NewRecordSecurity(user auser.RecordUserIdentity, action RecordActionType, event string) *RecordSecurity

NewRecordSecurity creates a new RecordSecurity instance with the current time.

func (*RecordSecurity) EnsureEventDefaults

func (rs *RecordSecurity) EnsureEventDefaults(cols DbColumnNames)

EnsureEventDefaults sets a default event description based on the provided column names if the event is not already set.

func (*RecordSecurity) IsValid

func (rs *RecordSecurity) IsValid() error

IsValid checks if the RecordSecurity instance is valid by ensuring that required fields are set and not empty.

func (RecordSecurity) MarshalJSON_Log_NoTimeNoHistory

func (rs RecordSecurity) MarshalJSON_Log_NoTimeNoHistory() ([]byte, error)

func (*RecordSecurity) UpdateFrom

func (rs *RecordSecurity) UpdateFrom(target *RecordSecurity) error

UpdateFrom updates the current RecordSecurity with information from another instance, adding the previous state to the history.

type RecordSecurityHistoryTime

type RecordSecurityHistoryTime struct {
	User   auser.RecordUserIdentity `json:"user"`
	Action RecordActionType         `json:"action"`
	Event  string                   `json:"event"`
	Time   time.Time                `json:"time"`
}

RecordSecurityHistoryTime represents a single historical security record.

type RecordSecurityHistoryTimes

type RecordSecurityHistoryTimes []*RecordSecurityHistoryTime

RecordSecurityHistoryTimes is a slice of RecordSecurityHistoryTime.

func (*RecordSecurityHistoryTimes) AddEntry

func (rsh *RecordSecurityHistoryTimes) AddEntry(user auser.RecordUserIdentity, action RecordActionType, event string, time time.Time)

AddEntry adds a new entry to the RecordSecurityHistoryTimes.

func (RecordSecurityHistoryTimes) FilterByAction

FilterByAction returns a new RecordSecurityHistoryTimes containing only the entries that match the given action.

func (RecordSecurityHistoryTimes) FindEntriesByUser

FindEntriesByUser returns all entries in the RecordSecurityHistoryTimes performed by a given user.

func (RecordSecurityHistoryTimes) LatestEntry

LatestEntry returns the most recent entry in the RecordSecurityHistoryTimes.

type SBAdapterSql

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

SBAdapterSql provides SQL capabilities for sandboxed adapters.

func NewSBAdapterSql

func NewSBAdapterSql(adapter IAdapterDB, db *sql.DB) *SBAdapterSql

NewSBAdapterSql creates a new SBAdapterSql instance.

func (*SBAdapterSql) GetHost

func (sba *SBAdapterSql) GetHost() string

GetHost returns the adapter host.

func (*SBAdapterSql) GetName

func (sba *SBAdapterSql) GetName() AdapterName

GetName returns the adapter name.

func (*SBAdapterSql) GetType

func (sba *SBAdapterSql) GetType() AdapterType

GetType returns the adapter type.

func (*SBAdapterSql) Query

func (sba *SBAdapterSql) Query(query string) (ISBAdapterSqlRows, error)

Query executes a query and returns the result rows.

func (*SBAdapterSql) QueryArgs

func (sba *SBAdapterSql) QueryArgs(query string, args ...interface{}) (result ISBAdapterSqlRows, err error)

QueryArgs executes a query with arguments and returns the result rows.

func (*SBAdapterSql) QueryModel

func (sba *SBAdapterSql) QueryModel(query string, model interface{}) error

QueryModel returns an error as only QueryArgs is supported.

func (*SBAdapterSql) QueryModelArgs

func (sba *SBAdapterSql) QueryModelArgs(query string, model interface{}, args ...interface{}) error

QueryModelArgs returns an error as only QueryArgs is supported.

func (*SBAdapterSql) SupportsModels

func (sba *SBAdapterSql) SupportsModels() bool

SupportsModels returns false as models are not supported.

type SBAdapterSqlRows

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

SBAdapterSqlRows implements ISBAdapterSqlRows for sandbox environments.

func (*SBAdapterSqlRows) Close

func (rows *SBAdapterSqlRows) Close() (err error)

Close closes the SQL rows.

func (*SBAdapterSqlRows) EndTimer

func (rows *SBAdapterSqlRows) EndTimer() time.Duration

EndTimer ends the timer for the SQL rows operation and returns the duration.

func (*SBAdapterSqlRows) GetTimerDuration

func (rows *SBAdapterSqlRows) GetTimerDuration() time.Duration

GetTimerDuration returns the duration between the start and end times.

func (*SBAdapterSqlRows) Next

func (rows *SBAdapterSqlRows) Next() bool

Next advances to the next row in the result set.

func (*SBAdapterSqlRows) Scan

func (rows *SBAdapterSqlRows) Scan(dest ...any) (err error)

Scan copies the columns in the current row into the values pointed at by dest.

func (*SBAdapterSqlRows) StartTimer

func (rows *SBAdapterSqlRows) StartTimer()

StartTimer starts the timer for the SQL rows operation.

type TestStatus

type TestStatus string

TestStatus represents the status of the connection test.

const (
	TESTSTATUS_INITIALIZED            TestStatus = "initialized"
	TESTSTATUS_INITIALIZED_SUCCESSFUL TestStatus = "initialized+test-successful"
	TESTSTATUS_FAILED                 TestStatus = "test-failed"
)

Directories

Path Synopsis
aclient-ftp module
aclient-http module
aclient-ldap module
aclient-smtp module
adb-mssql module
adb-mysql module
adb-oracle module
adb-pg module

Jump to

Keyboard shortcuts

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