Documentation ¶
Index ¶
- func New(config *Config, d *db.Database, applicationName string, logger *zap.Logger) (*db.Database, error)
- type APIProductCache
- func (s *APIProductCache) Delete(organizationName, apiProduct string) types.Error
- func (s *APIProductCache) Get(organizationName, apiproductName string) (*types.APIProduct, types.Error)
- func (s *APIProductCache) GetAll(organizationName string) (types.APIProducts, types.Error)
- func (s *APIProductCache) Update(organizationName string, p *types.APIProduct) types.Error
- type Cache
- type Config
- type DeveloperAppCache
- func (s *DeveloperAppCache) DeleteByID(organizationName, developerAppID string) types.Error
- func (s *DeveloperAppCache) GetAll(organizationName string) (types.DeveloperApps, types.Error)
- func (s *DeveloperAppCache) GetAllByDeveloperID(organizationName, developerID string) (types.DeveloperApps, types.Error)
- func (s *DeveloperAppCache) GetByID(organizationName, developerAppID string) (*types.DeveloperApp, types.Error)
- func (s *DeveloperAppCache) GetByName(organizationName string, developerEmail, developerAppName string) (*types.DeveloperApp, types.Error)
- func (s *DeveloperAppCache) GetCountByDeveloperID(organizationName, developerID string) (int, types.Error)
- func (s *DeveloperAppCache) Update(organizationName string, app *types.DeveloperApp) types.Error
- type DeveloperCache
- func (s *DeveloperCache) DeleteByID(organizationName, developerID string) types.Error
- func (s *DeveloperCache) GetAll(organizationName string) (types.Developers, types.Error)
- func (s *DeveloperCache) GetByEmail(organizationName, developerEmail string) (*types.Developer, types.Error)
- func (s *DeveloperCache) GetByID(organizationName, developerID string) (*types.Developer, types.Error)
- func (s *DeveloperCache) Update(organizationName string, d *types.Developer) types.Error
- type KeyCache
- func (s *KeyCache) DeleteByKey(organizationName, consumerKey string) types.Error
- func (s *KeyCache) GetByDeveloperAppID(organizationName, developerAppID string) (types.Keys, types.Error)
- func (s *KeyCache) GetByKey(organizationName, key *string) (*types.Key, types.Error)
- func (s *KeyCache) GetCountByAPIProductName(organizationName, apiProductName string) (int, types.Error)
- func (s *KeyCache) UpdateByKey(organizationName string, c *types.Key) types.Error
- type OAuthCache
- func (s *OAuthCache) OAuthAccessTokenCreate(t *types.OAuthAccessToken) error
- func (s *OAuthCache) OAuthAccessTokenGetByAccess(accessToken string) (*types.OAuthAccessToken, error)
- func (s *OAuthCache) OAuthAccessTokenGetByCode(code string) (*types.OAuthAccessToken, error)
- func (s *OAuthCache) OAuthAccessTokenGetByRefresh(refresh string) (*types.OAuthAccessToken, error)
- func (s *OAuthCache) OAuthAccessTokenRemoveByAccess(accessTokenToDelete string) error
- func (s *OAuthCache) OAuthAccessTokenRemoveByCode(codeToDelete string) error
- func (s *OAuthCache) OAuthAccessTokenRemoveByRefresh(refreshToDelete string) error
- type RoleCache
- type UserCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIProductCache ¶
type APIProductCache struct {
// contains filtered or unexported fields
}
APIProductCache holds our database config
func NewAPIProductCache ¶
func NewAPIProductCache(cache *Cache, apiproduct db.APIProduct) *APIProductCache
NewAPIProductCache creates apiproduct instance
func (*APIProductCache) Delete ¶
func (s *APIProductCache) Delete(organizationName, apiProduct string) types.Error
Delete deletes an apiproduct
func (*APIProductCache) Get ¶
func (s *APIProductCache) Get(organizationName, apiproductName string) (*types.APIProduct, types.Error)
Get returns an apiproduct
func (*APIProductCache) GetAll ¶
func (s *APIProductCache) GetAll(organizationName string) (types.APIProducts, types.Error)
GetAll retrieves all api products
func (*APIProductCache) Update ¶
func (s *APIProductCache) Update(organizationName string, p *types.APIProduct) types.Error
Update UPSERTs an apiproduct in database
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache holds our runtime parameters
type DeveloperAppCache ¶
type DeveloperAppCache struct {
// contains filtered or unexported fields
}
DeveloperAppCache holds our database config
func NewDeveloperAppCache ¶
func NewDeveloperAppCache(cache *Cache, developerapp db.DeveloperApp) *DeveloperAppCache
NewDeveloperAppCache creates developer instance
func (*DeveloperAppCache) DeleteByID ¶
func (s *DeveloperAppCache) DeleteByID(organizationName, developerAppID string) types.Error
DeleteByID deletes a developer app
func (*DeveloperAppCache) GetAll ¶
func (s *DeveloperAppCache) GetAll(organizationName string) (types.DeveloperApps, types.Error)
GetAll retrieves all developer apps
func (*DeveloperAppCache) GetAllByDeveloperID ¶
func (s *DeveloperAppCache) GetAllByDeveloperID(organizationName, developerID string) (types.DeveloperApps, types.Error)
GetAllByDeveloperID retrieves all developer apps from one developer
func (*DeveloperAppCache) GetByID ¶
func (s *DeveloperAppCache) GetByID(organizationName, developerAppID string) (*types.DeveloperApp, types.Error)
GetByID returns a developer app
func (*DeveloperAppCache) GetByName ¶
func (s *DeveloperAppCache) GetByName(organizationName string, developerEmail, developerAppName string) (*types.DeveloperApp, types.Error)
GetByName returns a developer app
func (*DeveloperAppCache) GetCountByDeveloperID ¶
func (s *DeveloperAppCache) GetCountByDeveloperID(organizationName, developerID string) (int, types.Error)
GetCountByDeveloperID retrieves number of apps belonging to a developer
func (*DeveloperAppCache) Update ¶
func (s *DeveloperAppCache) Update(organizationName string, app *types.DeveloperApp) types.Error
Update UPSERTs a developer app
type DeveloperCache ¶
type DeveloperCache struct {
// contains filtered or unexported fields
}
DeveloperCache holds our database config
func NewDeveloperCache ¶
func NewDeveloperCache(cache *Cache, developer db.Developer) *DeveloperCache
NewDeveloperCache creates developer instance
func (*DeveloperCache) DeleteByID ¶
func (s *DeveloperCache) DeleteByID(organizationName, developerID string) types.Error
DeleteByID deletes a developer
func (*DeveloperCache) GetAll ¶
func (s *DeveloperCache) GetAll(organizationName string) (types.Developers, types.Error)
GetAll retrieves all developer
func (*DeveloperCache) GetByEmail ¶
func (s *DeveloperCache) GetByEmail(organizationName, developerEmail string) (*types.Developer, types.Error)
GetByEmail retrieves a developer from database
type KeyCache ¶
type KeyCache struct {
// contains filtered or unexported fields
}
KeyCache holds our database config
func NewKeyCache ¶
NewKeyCache creates key instance
func (*KeyCache) DeleteByKey ¶
DeleteByKey deletes keys
func (*KeyCache) GetByDeveloperAppID ¶
func (s *KeyCache) GetByDeveloperAppID(organizationName, developerAppID string) (types.Keys, types.Error)
GetByDeveloperAppID returns an array with apikey details of a developer app
type OAuthCache ¶
type OAuthCache struct {
// contains filtered or unexported fields
}
OAuthCache holds our database config
func NewOAuthCache ¶
func NewOAuthCache(cache *Cache, oauth db.OAuth) *OAuthCache
NewOAuthCache creates user instance
func (*OAuthCache) OAuthAccessTokenCreate ¶
func (s *OAuthCache) OAuthAccessTokenCreate(t *types.OAuthAccessToken) error
OAuthAccessTokenCreate UPSERTs a token in database
func (*OAuthCache) OAuthAccessTokenGetByAccess ¶
func (s *OAuthCache) OAuthAccessTokenGetByAccess(accessToken string) (*types.OAuthAccessToken, error)
OAuthAccessTokenGetByAccess retrieves an access token
func (*OAuthCache) OAuthAccessTokenGetByCode ¶
func (s *OAuthCache) OAuthAccessTokenGetByCode(code string) (*types.OAuthAccessToken, error)
OAuthAccessTokenGetByCode retrieves token by code
func (*OAuthCache) OAuthAccessTokenGetByRefresh ¶
func (s *OAuthCache) OAuthAccessTokenGetByRefresh(refresh string) (*types.OAuthAccessToken, error)
OAuthAccessTokenGetByRefresh retrieves token by refreshcode
func (*OAuthCache) OAuthAccessTokenRemoveByAccess ¶
func (s *OAuthCache) OAuthAccessTokenRemoveByAccess(accessTokenToDelete string) error
OAuthAccessTokenRemoveByAccess deletes an access token
func (*OAuthCache) OAuthAccessTokenRemoveByCode ¶
func (s *OAuthCache) OAuthAccessTokenRemoveByCode(codeToDelete string) error
OAuthAccessTokenRemoveByCode deletes an access token
func (*OAuthCache) OAuthAccessTokenRemoveByRefresh ¶
func (s *OAuthCache) OAuthAccessTokenRemoveByRefresh(refreshToDelete string) error
OAuthAccessTokenRemoveByRefresh deletes an access token
type RoleCache ¶
type RoleCache struct {
// contains filtered or unexported fields
}
RoleCache holds our database config
func NewRoleCache ¶
NewRoleCache creates role instance
type UserCache ¶
type UserCache struct {
// contains filtered or unexported fields
}
UserCache holds our database config
func NewUserCache ¶
NewUserCache creates user instance