Documentation ¶
Index ¶
- func InitRepositoryProvider(databaseProvider string)
- func NewPostgresCNSIRepository(dcp *sql.DB) (interfaces.EndpointRepository, error)
- type PostgresCNSIRepository
- func (p *PostgresCNSIRepository) Delete(guid string) error
- func (p *PostgresCNSIRepository) Find(guid string, encryptionKey []byte) (interfaces.CNSIRecord, error)
- func (p *PostgresCNSIRepository) FindByAPIEndpoint(endpoint string, encryptionKey []byte) (interfaces.CNSIRecord, error)
- func (p *PostgresCNSIRepository) List(encryptionKey []byte) ([]*interfaces.CNSIRecord, error)
- func (p *PostgresCNSIRepository) ListByUser(userGUID string) ([]*interfaces.ConnectedEndpoint, error)
- func (p *PostgresCNSIRepository) Save(guid string, cnsi interfaces.CNSIRecord, encryptionKey []byte) error
- func (p *PostgresCNSIRepository) SaveOrUpdate(endpoint interfaces.CNSIRecord, encryptionKey []byte) error
- func (p *PostgresCNSIRepository) Update(endpoint interfaces.CNSIRecord, encryptionKey []byte) error
- func (p *PostgresCNSIRepository) UpdateMetadata(guid string, metadata string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitRepositoryProvider ¶
func InitRepositoryProvider(databaseProvider string)
InitRepositoryProvider - One time init for the given DB Provider
func NewPostgresCNSIRepository ¶
func NewPostgresCNSIRepository(dcp *sql.DB) (interfaces.EndpointRepository, error)
NewPostgresCNSIRepository will create a new instance of the PostgresCNSIRepository
Types ¶
type PostgresCNSIRepository ¶
type PostgresCNSIRepository struct {
// contains filtered or unexported fields
}
PostgresCNSIRepository is a PostgreSQL-backed CNSI repository
func (*PostgresCNSIRepository) Delete ¶
func (p *PostgresCNSIRepository) Delete(guid string) error
Delete will delete a CNSI Record from the datastore
func (*PostgresCNSIRepository) Find ¶
func (p *PostgresCNSIRepository) Find(guid string, encryptionKey []byte) (interfaces.CNSIRecord, error)
Find - Returns a single CNSI Record
func (*PostgresCNSIRepository) FindByAPIEndpoint ¶
func (p *PostgresCNSIRepository) FindByAPIEndpoint(endpoint string, encryptionKey []byte) (interfaces.CNSIRecord, error)
FindByAPIEndpoint - Returns a single CNSI Record
func (*PostgresCNSIRepository) List ¶
func (p *PostgresCNSIRepository) List(encryptionKey []byte) ([]*interfaces.CNSIRecord, error)
List - Returns a list of CNSI Records
func (*PostgresCNSIRepository) ListByUser ¶
func (p *PostgresCNSIRepository) ListByUser(userGUID string) ([]*interfaces.ConnectedEndpoint, error)
ListByUser - Returns a list of CNSIs registered by a user
func (*PostgresCNSIRepository) Save ¶
func (p *PostgresCNSIRepository) Save(guid string, cnsi interfaces.CNSIRecord, encryptionKey []byte) error
Save will persist a CNSI Record to a datastore
func (*PostgresCNSIRepository) SaveOrUpdate ¶
func (p *PostgresCNSIRepository) SaveOrUpdate(endpoint interfaces.CNSIRecord, encryptionKey []byte) error
SaveOrUpdate - Creates or Updates CNSI Record
func (*PostgresCNSIRepository) Update ¶
func (p *PostgresCNSIRepository) Update(endpoint interfaces.CNSIRecord, encryptionKey []byte) error
Update - Update an endpoint's data
func (*PostgresCNSIRepository) UpdateMetadata ¶
func (p *PostgresCNSIRepository) UpdateMetadata(guid string, metadata string) error
UpdateMetadata - Update an endpoint's metadata
Click to show internal directories.
Click to hide internal directories.