connections

package
v0.0.0-...-31b9434 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Id          ConnectionId   `json:"ConnectionId"`
	Name        ConnectionName `json:"ConnectionName"`
	HostAndPort HostAndPort    `json:",omitempty"`
	Username    Username       `json:",omitempty"`
	Password    Password       `json:",omitempty"`
}

type ConnectionId

type ConnectionId = string

type ConnectionName

type ConnectionName = string

type DynamoDbRepository

type DynamoDbRepository struct {
	TableName string
	Client    *dynamodb.DynamoDB
}

func (*DynamoDbRepository) GetConnectionFor

func (r *DynamoDbRepository) GetConnectionFor(id ConnectionId) (*Connection, error)

func (*DynamoDbRepository) GetConnections

func (r *DynamoDbRepository) GetConnections() (*[]Connection, error)

func (*DynamoDbRepository) StoreConnection

func (r *DynamoDbRepository) StoreConnection(connection *Connection) error

type HostAndPort

type HostAndPort = string

type InMemoryCachedRepository

type InMemoryCachedRepository struct {
	Delegate     Repository
	CacheManager *cache.Cache
	Ttl          string
}

func (*InMemoryCachedRepository) GetConnectionFor

func (r *InMemoryCachedRepository) GetConnectionFor(id ConnectionId) (*Connection, error)

func (*InMemoryCachedRepository) GetConnections

func (r *InMemoryCachedRepository) GetConnections() (*[]Connection, error)

func (*InMemoryCachedRepository) StoreConnection

func (r *InMemoryCachedRepository) StoreConnection(connection *Connection) error

type Password

type Password = string

type Repository

type Repository interface {
	GetConnectionFor(id ConnectionId) (*Connection, error)
	GetConnections() (*[]Connection, error)
	StoreConnection(connection *Connection) error
}

type Username

type Username = string

Jump to

Keyboard shortcuts

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