Documentation
¶
Index ¶
- type Cache
- type CustomProvidersManager
- func (m *CustomProvidersManager) CreateCustomProvider(provider *custom.Provider) (*custom.Provider, error)
- func (m *CustomProvidersManager) GetCustomProviderFromMem(name string) *custom.Provider
- func (m *CustomProvidersManager) GetCustomProviders() ([]*custom.Provider, error)
- func (m *CustomProvidersManager) GetRouteConfigFromMem(name, path string) *custom.RouteConfig
- func (m *CustomProvidersManager) UpdateCustomProvider(id string, provider *custom.UpdateProvider) (*custom.Provider, error)
- type CustomProvidersMemStorage
- type CustomProvidersStorage
- type Manager
- func (m *Manager) CreateKey(rk *key.RequestKey) (*key.ResponseKey, error)
- func (m *Manager) DeleteKey(id string) error
- func (m *Manager) GetKeys(tags, keyIds []string, provider string) ([]*key.ResponseKey, error)
- func (m *Manager) GetKeysV2(tags, keyIds []string, revoked *bool, limit, offset int, name, order string, ...) (*key.GetKeysResponse, error)
- func (m *Manager) UpdateKey(id string, uk *key.UpdateKey) (*key.ResponseKey, error)
- type PoliciesMemStorage
- type PoliciesStorage
- type PolicyManager
- func (m *PolicyManager) CreatePolicy(p *policy.Policy) (*policy.Policy, error)
- func (m *PolicyManager) GetPoliciesByTags(tags []string) ([]*policy.Policy, error)
- func (m *PolicyManager) GetPolicyByIdFromMemdb(id string) *policy.Policy
- func (m *PolicyManager) UpdatePolicy(id string, p *policy.UpdatePolicy) (*policy.Policy, error)
- type ProviderSettingsManager
- func (m *ProviderSettingsManager) CreateSetting(setting *provider.Setting) (*provider.Setting, error)
- func (m *ProviderSettingsManager) GetSetting(id string) (*provider.Setting, error)
- func (m *ProviderSettingsManager) GetSettingFromDb(id string) (*provider.Setting, error)
- func (m *ProviderSettingsManager) GetSettings(ids []string) ([]*provider.Setting, error)
- func (m *ProviderSettingsManager) UpdateSetting(id string, setting *provider.UpdateSetting) (*provider.Setting, error)
- type ProviderSettingsMemStorage
- type ProviderSettingsStorage
- type RateLimitManager
- type ReportingManager
- func (rm *ReportingManager) GetAggregatedEventByDayReporting(e *event.ReportingRequest) (*event.ReportingResponse, error)
- func (rm *ReportingManager) GetCustomIds(keyId string) ([]string, error)
- func (rm *ReportingManager) GetEventReporting(e *event.ReportingRequest) (*event.ReportingResponse, error)
- func (rm *ReportingManager) GetEvents(userId, customId string, keyIds []string, start, end int64) ([]*event.Event, error)
- func (rm *ReportingManager) GetEventsV2(req *event.EventRequest) ([]*event.Event, error)
- func (rm *ReportingManager) GetKeyReporting(keyId string) (*key.KeyReporting, error)
- func (rm *ReportingManager) GetTopKeyReporting(r *event.KeyReportingRequest) (*event.KeyReportingResponse, error)
- func (rm *ReportingManager) GetUserIds(keyId string) ([]string, error)
- type RouteManager
- type RoutesMemStorage
- type RoutesStorage
- type Storage
- type UserManager
- func (m *UserManager) CreateUser(u *user.User) (*user.User, error)
- func (m *UserManager) GetUsers(tags, keyIds, userIds []string, offset int, limit int) ([]*user.User, error)
- func (m *UserManager) UpdateUser(id string, uu *user.UpdateUser) (*user.User, error)
- func (m *UserManager) UpdateUserViaTagsAndUserId(tags []string, uid string, uu *user.UpdateUser) (*user.User, error)
- type UserStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomProvidersManager ¶ added in v1.3.0
type CustomProvidersManager struct { Storage CustomProvidersStorage Mem CustomProvidersMemStorage }
func NewCustomProvidersManager ¶ added in v1.3.0
func NewCustomProvidersManager(s CustomProvidersStorage, mem CustomProvidersMemStorage) *CustomProvidersManager
func (*CustomProvidersManager) CreateCustomProvider ¶ added in v1.3.0
func (*CustomProvidersManager) GetCustomProviderFromMem ¶ added in v1.3.0
func (m *CustomProvidersManager) GetCustomProviderFromMem(name string) *custom.Provider
func (*CustomProvidersManager) GetCustomProviders ¶ added in v1.3.0
func (m *CustomProvidersManager) GetCustomProviders() ([]*custom.Provider, error)
func (*CustomProvidersManager) GetRouteConfigFromMem ¶ added in v1.3.0
func (m *CustomProvidersManager) GetRouteConfigFromMem(name, path string) *custom.RouteConfig
func (*CustomProvidersManager) UpdateCustomProvider ¶ added in v1.3.0
func (m *CustomProvidersManager) UpdateCustomProvider(id string, provider *custom.UpdateProvider) (*custom.Provider, error)
type CustomProvidersMemStorage ¶ added in v1.3.0
type CustomProvidersStorage ¶ added in v1.3.0
type CustomProvidersStorage interface { CreateCustomProvider(provider *custom.Provider) (*custom.Provider, error) GetCustomProviders() ([]*custom.Provider, error) GetCustomProviderByName(name string) (*custom.Provider, error) GetCustomProvider(id string) (*custom.Provider, error) UpdateCustomProvider(id string, provider *custom.UpdateProvider) (*custom.Provider, error) }
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) CreateKey ¶
func (m *Manager) CreateKey(rk *key.RequestKey) (*key.ResponseKey, error)
type PoliciesMemStorage ¶ added in v1.13.0
type PoliciesStorage ¶ added in v1.13.0
type PolicyManager ¶ added in v1.13.0
type PolicyManager struct { Storage PoliciesStorage Memdb PoliciesMemStorage }
func NewPolicyManager ¶ added in v1.13.0
func NewPolicyManager(s PoliciesStorage, memdb PoliciesMemStorage) *PolicyManager
func (*PolicyManager) CreatePolicy ¶ added in v1.13.0
func (*PolicyManager) GetPoliciesByTags ¶ added in v1.13.0
func (m *PolicyManager) GetPoliciesByTags(tags []string) ([]*policy.Policy, error)
func (*PolicyManager) GetPolicyByIdFromMemdb ¶ added in v1.13.0
func (m *PolicyManager) GetPolicyByIdFromMemdb(id string) *policy.Policy
func (*PolicyManager) UpdatePolicy ¶ added in v1.13.0
func (m *PolicyManager) UpdatePolicy(id string, p *policy.UpdatePolicy) (*policy.Policy, error)
type ProviderSettingsManager ¶ added in v1.0.0
type ProviderSettingsManager struct { Storage ProviderSettingsStorage MemDb ProviderSettingsMemStorage }
func NewProviderSettingsManager ¶ added in v1.0.0
func NewProviderSettingsManager(s ProviderSettingsStorage, memdb ProviderSettingsMemStorage) *ProviderSettingsManager
func (*ProviderSettingsManager) CreateSetting ¶ added in v1.0.0
func (*ProviderSettingsManager) GetSetting ¶ added in v1.0.0
func (m *ProviderSettingsManager) GetSetting(id string) (*provider.Setting, error)
func (*ProviderSettingsManager) GetSettingFromDb ¶ added in v1.14.2
func (m *ProviderSettingsManager) GetSettingFromDb(id string) (*provider.Setting, error)
func (*ProviderSettingsManager) GetSettings ¶ added in v1.2.0
func (m *ProviderSettingsManager) GetSettings(ids []string) ([]*provider.Setting, error)
func (*ProviderSettingsManager) UpdateSetting ¶ added in v1.0.0
func (m *ProviderSettingsManager) UpdateSetting(id string, setting *provider.UpdateSetting) (*provider.Setting, error)
type ProviderSettingsMemStorage ¶ added in v1.0.0
type ProviderSettingsStorage ¶ added in v1.0.0
type ProviderSettingsStorage interface { UpdateProviderSetting(id string, setting *provider.UpdateSetting) (*provider.Setting, error) CreateProviderSetting(setting *provider.Setting) (*provider.Setting, error) GetProviderSetting(id string, withSecret bool) (*provider.Setting, error) GetCustomProviderByName(name string) (*custom.Provider, error) GetProviderSettings(withSecret bool, ids []string) ([]*provider.Setting, error) }
type RateLimitManager ¶ added in v0.0.2
type RateLimitManager struct {
// contains filtered or unexported fields
}
func NewRateLimitManager ¶ added in v0.0.2
func NewRateLimitManager(c Cache, uc Cache) *RateLimitManager
func (*RateLimitManager) Increment ¶ added in v0.0.2
func (rlm *RateLimitManager) Increment(keyId string, timeUnit key.TimeUnit) error
func (*RateLimitManager) IncrementUser ¶ added in v1.18.0
func (rlm *RateLimitManager) IncrementUser(id string, timeUnit key.TimeUnit) error
type ReportingManager ¶ added in v0.0.7
type ReportingManager struct {
// contains filtered or unexported fields
}
func NewReportingManager ¶ added in v0.0.7
func NewReportingManager(cs costStorage, ks keyStorage, es eventStorage) *ReportingManager
func (*ReportingManager) GetAggregatedEventByDayReporting ¶ added in v1.13.11
func (rm *ReportingManager) GetAggregatedEventByDayReporting(e *event.ReportingRequest) (*event.ReportingResponse, error)
func (*ReportingManager) GetCustomIds ¶ added in v1.17.0
func (rm *ReportingManager) GetCustomIds(keyId string) ([]string, error)
func (*ReportingManager) GetEventReporting ¶ added in v0.0.9
func (rm *ReportingManager) GetEventReporting(e *event.ReportingRequest) (*event.ReportingResponse, error)
func (*ReportingManager) GetEventsV2 ¶ added in v1.19.0
func (rm *ReportingManager) GetEventsV2(req *event.EventRequest) ([]*event.Event, error)
func (*ReportingManager) GetKeyReporting ¶ added in v0.0.7
func (rm *ReportingManager) GetKeyReporting(keyId string) (*key.KeyReporting, error)
func (*ReportingManager) GetTopKeyReporting ¶ added in v1.18.0
func (rm *ReportingManager) GetTopKeyReporting(r *event.KeyReportingRequest) (*event.KeyReportingResponse, error)
func (*ReportingManager) GetUserIds ¶ added in v1.17.0
func (rm *ReportingManager) GetUserIds(keyId string) ([]string, error)
type RouteManager ¶ added in v1.7.0
type RouteManager struct {
// contains filtered or unexported fields
}
func NewRouteManager ¶ added in v1.7.0
func NewRouteManager(s RoutesStorage, ks Storage, ms RoutesMemStorage, psm ProviderSettingsMemStorage) *RouteManager
func (*RouteManager) CreateRoute ¶ added in v1.7.0
func (*RouteManager) GetRoute ¶ added in v1.7.0
func (m *RouteManager) GetRoute(id string) (*route.Route, error)
func (*RouteManager) GetRouteFromMemDb ¶ added in v1.7.0
func (m *RouteManager) GetRouteFromMemDb(path string) *route.Route
type RoutesMemStorage ¶ added in v1.7.0
type RoutesStorage ¶ added in v1.7.0
type Storage ¶
type Storage interface { GetKeys(tags, keyIds []string, provider string) ([]*key.ResponseKey, error) GetKeysV2(tags, keyIds []string, revoked *bool, limit, offset int, name, order string, returnCount bool) (*key.GetKeysResponse, error) UpdateKey(id string, key *key.UpdateKey) (*key.ResponseKey, error) CreateKey(key *key.RequestKey) (*key.ResponseKey, error) DeleteKey(id string) error GetProviderSetting(id string, withSecret bool) (*provider.Setting, error) GetPolicyById(id string) (*policy.Policy, error) GetProviderSettings(withSecret bool, ids []string) ([]*provider.Setting, error) GetKey(keyId string) (*key.ResponseKey, error) }
type UserManager ¶ added in v1.18.0
type UserManager struct {
// contains filtered or unexported fields
}
func NewUserManager ¶ added in v1.18.0
func NewUserManager(us UserStorage, ks Storage) *UserManager
func (*UserManager) CreateUser ¶ added in v1.18.0
func (*UserManager) UpdateUser ¶ added in v1.18.0
func (m *UserManager) UpdateUser(id string, uu *user.UpdateUser) (*user.User, error)
func (*UserManager) UpdateUserViaTagsAndUserId ¶ added in v1.18.0
func (m *UserManager) UpdateUserViaTagsAndUserId(tags []string, uid string, uu *user.UpdateUser) (*user.User, error)
type UserStorage ¶ added in v1.18.0
type UserStorage interface { GetUsers(tags, keyIds, userIds []string, offset int, limit int) ([]*user.User, error) CreateUser(u *user.User) (*user.User, error) UpdateUser(id string, uu *user.UpdateUser) (*user.User, error) UpdateUserViaTagsAndUserId(tags []string, uid string, uu *user.UpdateUser) (*user.User, error) }
Click to show internal directories.
Click to hide internal directories.