Documentation ¶
Index ¶
- func InitRepositoryProvider(databaseProvider string)
- type PgsqlTokenRepository
- func (p *PgsqlTokenRepository) DeleteCNSIToken(cnsiGUID string, userGUID string) error
- func (p *PgsqlTokenRepository) FindAuthToken(userGUID string, encryptionKey []byte) (interfaces.TokenRecord, error)
- func (p *PgsqlTokenRepository) FindCNSIToken(cnsiGUID string, userGUID string, encryptionKey []byte) (interfaces.TokenRecord, error)
- func (p *PgsqlTokenRepository) FindCNSITokenIncludeDisconnected(cnsiGUID string, userGUID string, encryptionKey []byte) (interfaces.TokenRecord, error)
- func (p *PgsqlTokenRepository) SaveAuthToken(userGUID string, tr interfaces.TokenRecord, encryptionKey []byte) error
- func (p *PgsqlTokenRepository) SaveCNSIToken(cnsiGUID string, userGUID string, tr interfaces.TokenRecord, ...) error
- type Repository
- type Token
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
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) FindAuthToken ¶
func (p *PgsqlTokenRepository) FindAuthToken(userGUID string, encryptionKey []byte) (interfaces.TokenRecord, error)
FindAuthToken - return the UAA token from the datastore
func (*PgsqlTokenRepository) FindCNSIToken ¶
func (p *PgsqlTokenRepository) FindCNSIToken(cnsiGUID string, userGUID string, encryptionKey []byte) (interfaces.TokenRecord, error)
func (*PgsqlTokenRepository) FindCNSITokenIncludeDisconnected ¶
func (p *PgsqlTokenRepository) FindCNSITokenIncludeDisconnected(cnsiGUID string, userGUID string, encryptionKey []byte) (interfaces.TokenRecord, error)
func (*PgsqlTokenRepository) SaveAuthToken ¶
func (p *PgsqlTokenRepository) SaveAuthToken(userGUID string, tr interfaces.TokenRecord, encryptionKey []byte) error
saveAuthToken - Save the Auth token to the datastore
func (*PgsqlTokenRepository) SaveCNSIToken ¶
func (p *PgsqlTokenRepository) SaveCNSIToken(cnsiGUID string, userGUID string, tr interfaces.TokenRecord, encryptionKey []byte) error
SaveCNSIToken - Save the CNSI (UAA) token to the datastore
type Repository ¶
type Repository interface { FindAuthToken(userGUID string, encryptionKey []byte) (interfaces.TokenRecord, error) SaveAuthToken(userGUID string, tokenRecord interfaces.TokenRecord, encryptionKey []byte) error FindCNSIToken(cnsiGUID string, userGUID string, encryptionKey []byte) (interfaces.TokenRecord, error) FindCNSITokenIncludeDisconnected(cnsiGUID string, userGUID string, encryptionKey []byte) (interfaces.TokenRecord, error) DeleteCNSIToken(cnsiGUID string, userGUID string) error SaveCNSIToken(cnsiGUID string, userGUID string, tokenRecord interfaces.TokenRecord, encryptionKey []byte) error }
Repository is an application of the repository pattern for storing tokens
func NewPgsqlTokenRepository ¶
func NewPgsqlTokenRepository(dcp *sql.DB) (Repository, error)
NewPgsqlTokenRepository - get a reference to the token data source
type Token ¶
type Token struct { UserGUID string TokenType string Record interfaces.TokenRecord }
Token -
Click to show internal directories.
Click to hide internal directories.