Documentation ¶
Index ¶
- Constants
- func InitRepositoryProvider(databaseProvider string)
- func NewPgsqlTokenRepository(dcp *sql.DB) (api.TokenRepository, error)
- type PgsqlTokenRepository
- func (p *PgsqlTokenRepository) DeleteCNSIToken(cnsiGUID string, userGUID string) error
- func (p *PgsqlTokenRepository) DeleteCNSITokens(cnsiGUID string) error
- func (p *PgsqlTokenRepository) FindAllCNSITokenBackup(cnsiGUID string, encryptionKey []byte) ([]api.BackupTokenRecord, error)
- func (p *PgsqlTokenRepository) FindAuthToken(userGUID string, encryptionKey []byte) (api.TokenRecord, error)
- func (p *PgsqlTokenRepository) FindCNSIToken(cnsiGUID string, userGUID string, encryptionKey []byte) (api.TokenRecord, error)
- func (p *PgsqlTokenRepository) FindCNSITokenIncludeDisconnected(cnsiGUID string, userGUID string, encryptionKey []byte) (api.TokenRecord, error)
- func (p *PgsqlTokenRepository) SaveAuthToken(userGUID string, tr api.TokenRecord, encryptionKey []byte) error
- func (p *PgsqlTokenRepository) SaveCNSIToken(cnsiGUID string, userGUID string, tr api.TokenRecord, encryptionKey []byte) error
- func (p *PgsqlTokenRepository) UpdateTokenAuth(userGUID string, tr api.TokenRecord, encryptionKey []byte) error
Constants ¶
SystemSharedUserGuid - User ID for the system shared user for endpoints. Also used by front end
Variables ¶
This section is empty.
Functions ¶
func InitRepositoryProvider ¶
func InitRepositoryProvider(databaseProvider string)
InitRepositoryProvider - One time init for the given DB Provider
func NewPgsqlTokenRepository ¶
func NewPgsqlTokenRepository(dcp *sql.DB) (api.TokenRepository, error)
NewPgsqlTokenRepository - get a reference to the token data source
Types ¶
type PgsqlTokenRepository ¶
type PgsqlTokenRepository struct {
// contains filtered or unexported fields
}
PgsqlTokenRepository is a PostgreSQL-backed token repository
func (*PgsqlTokenRepository) DeleteCNSIToken ¶
func (p *PgsqlTokenRepository) DeleteCNSIToken(cnsiGUID string, userGUID string) error
DeleteCNSIToken - remove a CNSI token (disconnect from a given CNSI)
func (*PgsqlTokenRepository) DeleteCNSITokens ¶
func (p *PgsqlTokenRepository) DeleteCNSITokens(cnsiGUID string) error
func (*PgsqlTokenRepository) FindAllCNSITokenBackup ¶
func (p *PgsqlTokenRepository) FindAllCNSITokenBackup(cnsiGUID string, encryptionKey []byte) ([]api.BackupTokenRecord, error)
func (*PgsqlTokenRepository) FindAuthToken ¶
func (p *PgsqlTokenRepository) FindAuthToken(userGUID string, encryptionKey []byte) (api.TokenRecord, error)
FindAuthToken - return the UAA token from the datastore
func (*PgsqlTokenRepository) FindCNSIToken ¶
func (p *PgsqlTokenRepository) FindCNSIToken(cnsiGUID string, userGUID string, encryptionKey []byte) (api.TokenRecord, error)
func (*PgsqlTokenRepository) FindCNSITokenIncludeDisconnected ¶
func (p *PgsqlTokenRepository) FindCNSITokenIncludeDisconnected(cnsiGUID string, userGUID string, encryptionKey []byte) (api.TokenRecord, error)
func (*PgsqlTokenRepository) SaveAuthToken ¶
func (p *PgsqlTokenRepository) SaveAuthToken(userGUID string, tr api.TokenRecord, encryptionKey []byte) error
saveAuthToken - Save the Auth token to the datastore
func (*PgsqlTokenRepository) SaveCNSIToken ¶
func (p *PgsqlTokenRepository) SaveCNSIToken(cnsiGUID string, userGUID string, tr api.TokenRecord, encryptionKey []byte) error
SaveCNSIToken - Save the CNSI (UAA) token to the datastore
func (*PgsqlTokenRepository) UpdateTokenAuth ¶
func (p *PgsqlTokenRepository) UpdateTokenAuth(userGUID string, tr api.TokenRecord, encryptionKey []byte) error
UpdateTokenAuth - Update a token's auth data
Click to show internal directories.
Click to hide internal directories.