Documentation ¶
Index ¶
- type MockStore
- func (s *MockStore) AllowTokens(tokens ...*jwt.Token) error
- func (s *MockStore) AuthenticateUser(ctx context.Context, username, password string) (*types.User, error)
- func (s *MockStore) CreateClusterID(ctx context.Context, id string) error
- func (s *MockStore) CreateClusterRole(ctx context.Context, clusterRole *types.ClusterRole) error
- func (s *MockStore) CreateClusterRoleBinding(ctx context.Context, ClusterRoleBinding *types.ClusterRoleBinding) error
- func (s *MockStore) CreateJWTSecret(secret []byte) error
- func (s *MockStore) CreateNamespace(ctx context.Context, org *types.Namespace) error
- func (s *MockStore) CreateOrUpdateClusterRole(ctx context.Context, clusterRole *types.ClusterRole) error
- func (s *MockStore) CreateOrUpdateClusterRoleBinding(ctx context.Context, ClusterRoleBinding *types.ClusterRoleBinding) error
- func (s *MockStore) CreateOrUpdateResource(ctx context.Context, resource corev2.Resource) error
- func (s *MockStore) CreateOrUpdateRole(ctx context.Context, role *types.Role) error
- func (s *MockStore) CreateOrUpdateRoleBinding(ctx context.Context, RoleBinding *types.RoleBinding) error
- func (s *MockStore) CreateOrUpdateTessenConfig(ctx context.Context, config *corev2.TessenConfig) error
- func (s *MockStore) CreateResource(ctx context.Context, resource corev2.Resource) error
- func (s *MockStore) CreateRole(ctx context.Context, role *types.Role) error
- func (s *MockStore) CreateRoleBinding(ctx context.Context, RoleBinding *types.RoleBinding) error
- func (s *MockStore) CreateUser(user *types.User) error
- func (s *MockStore) DeleteAssetByName(ctx context.Context, name string) error
- func (s *MockStore) DeleteCheckConfigByName(ctx context.Context, name string) error
- func (s *MockStore) DeleteClusterRole(ctx context.Context, name string) error
- func (s *MockStore) DeleteClusterRoleBinding(ctx context.Context, name string) error
- func (s *MockStore) DeleteEntity(ctx context.Context, e *types.Entity) error
- func (s *MockStore) DeleteEntityByName(ctx context.Context, id string) error
- func (s *MockStore) DeleteEventByEntityCheck(ctx context.Context, entityName, checkID string) error
- func (s *MockStore) DeleteEventFilterByName(ctx context.Context, name string) error
- func (s *MockStore) DeleteFailingKeepalive(ctx context.Context, entity *types.Entity) error
- func (s *MockStore) DeleteHandlerByName(ctx context.Context, name string) error
- func (s *MockStore) DeleteHookConfigByName(ctx context.Context, name string) error
- func (s *MockStore) DeleteMutatorByName(ctx context.Context, name string) error
- func (s *MockStore) DeleteNamespace(ctx context.Context, name string) error
- func (s *MockStore) DeleteResource(ctx context.Context, kind, name string) error
- func (s *MockStore) DeleteRole(ctx context.Context, name string) error
- func (s *MockStore) DeleteRoleBinding(ctx context.Context, name string) error
- func (s *MockStore) DeleteSilencedEntryByName(ctx context.Context, silencedID ...string) error
- func (s *MockStore) DeleteUser(ctx context.Context, user *types.User) error
- func (s *MockStore) DeregisterExtension(ctx context.Context, name string) error
- func (s *MockStore) GetAllUsers(pred *store.SelectionPredicate) ([]*types.User, error)
- func (s *MockStore) GetAssetByName(ctx context.Context, name string) (*types.Asset, error)
- func (s *MockStore) GetAssets(ctx context.Context, pred *store.SelectionPredicate) ([]*types.Asset, error)
- func (s *MockStore) GetCheckConfigByName(ctx context.Context, name string) (*types.CheckConfig, error)
- func (s *MockStore) GetCheckConfigWatcher(ctx context.Context) <-chan store.WatchEventCheckConfig
- func (s *MockStore) GetCheckConfigs(ctx context.Context, pred *store.SelectionPredicate) ([]*types.CheckConfig, error)
- func (s *MockStore) GetClusterHealth(ctx context.Context, cluster clientv3.Cluster, etcdClientTLSConfig *tls.Config) *types.HealthResponse
- func (s *MockStore) GetClusterID(ctx context.Context) (string, error)
- func (s *MockStore) GetClusterRole(ctx context.Context, name string) (*types.ClusterRole, error)
- func (s *MockStore) GetClusterRoleBinding(ctx context.Context, name string) (*types.ClusterRoleBinding, error)
- func (s *MockStore) GetEntities(ctx context.Context, pred *store.SelectionPredicate) ([]*types.Entity, error)
- func (s *MockStore) GetEntityByName(ctx context.Context, id string) (*types.Entity, error)
- func (s *MockStore) GetEntityWatcher(ctx context.Context) <-chan store.WatchEventEntity
- func (s *MockStore) GetEventByEntityCheck(ctx context.Context, entityName, checkID string) (*corev2.Event, error)
- func (s *MockStore) GetEventFilterByName(ctx context.Context, name string) (*types.EventFilter, error)
- func (s *MockStore) GetEventFilters(ctx context.Context, pred *store.SelectionPredicate) ([]*types.EventFilter, error)
- func (s *MockStore) GetEvents(ctx context.Context, pred *store.SelectionPredicate) ([]*corev2.Event, error)
- func (s *MockStore) GetEventsByEntity(ctx context.Context, entityName string, pred *store.SelectionPredicate) ([]*corev2.Event, error)
- func (s *MockStore) GetExtension(ctx context.Context, name string) (*types.Extension, error)
- func (s *MockStore) GetExtensions(ctx context.Context, pred *store.SelectionPredicate) ([]*types.Extension, error)
- func (s *MockStore) GetFailingKeepalives(ctx context.Context) ([]*types.KeepaliveRecord, error)
- func (s *MockStore) GetHandlerByName(ctx context.Context, name string) (*types.Handler, error)
- func (s *MockStore) GetHandlers(ctx context.Context, pred *store.SelectionPredicate) ([]*types.Handler, error)
- func (s *MockStore) GetHookConfigByName(ctx context.Context, name string) (*types.HookConfig, error)
- func (s *MockStore) GetHookConfigs(ctx context.Context, pred *store.SelectionPredicate) ([]*types.HookConfig, error)
- func (s *MockStore) GetJWTSecret() ([]byte, error)
- func (s *MockStore) GetMutatorByName(ctx context.Context, name string) (*types.Mutator, error)
- func (s *MockStore) GetMutators(ctx context.Context, pred *store.SelectionPredicate) ([]*types.Mutator, error)
- func (s *MockStore) GetNamespace(ctx context.Context, name string) (*types.Namespace, error)
- func (s *MockStore) GetResource(ctx context.Context, name string, resource corev2.Resource) error
- func (s *MockStore) GetRing(parts ...string) types.Ring
- func (s *MockStore) GetRole(ctx context.Context, name string) (*types.Role, error)
- func (s *MockStore) GetRoleBinding(ctx context.Context, name string) (*types.RoleBinding, error)
- func (s *MockStore) GetSilencedEntries(ctx context.Context) ([]*types.Silenced, error)
- func (s *MockStore) GetSilencedEntriesByCheckName(ctx context.Context, checkName string) ([]*types.Silenced, error)
- func (s *MockStore) GetSilencedEntriesByName(ctx context.Context, names ...string) ([]*types.Silenced, error)
- func (s *MockStore) GetSilencedEntriesBySubscription(ctx context.Context, subscriptions ...string) ([]*types.Silenced, error)
- func (s *MockStore) GetSilencedEntryByName(ctx context.Context, silencedID string) (*types.Silenced, error)
- func (s *MockStore) GetTessenConfig(ctx context.Context) (*corev2.TessenConfig, error)
- func (s *MockStore) GetTessenConfigWatcher(ctx context.Context) <-chan store.WatchEventTessenConfig
- func (s *MockStore) GetToken(subject, id string) (*types.Claims, error)
- func (s *MockStore) GetUser(ctx context.Context, username string) (*types.User, error)
- func (s *MockStore) GetUsers() ([]*types.User, error)
- func (s *MockStore) ListClusterRoleBindings(ctx context.Context, pred *store.SelectionPredicate) ([]*types.ClusterRoleBinding, error)
- func (s *MockStore) ListClusterRoles(ctx context.Context, pred *store.SelectionPredicate) ([]*types.ClusterRole, error)
- func (s *MockStore) ListNamespaces(ctx context.Context, pred *store.SelectionPredicate) ([]*types.Namespace, error)
- func (s *MockStore) ListResources(ctx context.Context, kind string, list interface{}, ...) error
- func (s *MockStore) ListRoleBindings(ctx context.Context, pred *store.SelectionPredicate) ([]*types.RoleBinding, error)
- func (s *MockStore) ListRoles(ctx context.Context, pred *store.SelectionPredicate) ([]*types.Role, error)
- func (store *MockStore) NewInitializer() (store.Initializer, error)
- func (s *MockStore) RegisterExtension(ctx context.Context, ext *types.Extension) error
- func (s *MockStore) RevokeTokens(claims ...*v2.Claims) error
- func (s *MockStore) UpdateAsset(ctx context.Context, asset *types.Asset) error
- func (s *MockStore) UpdateCheckConfig(ctx context.Context, check *types.CheckConfig) error
- func (s *MockStore) UpdateClusterRole(ctx context.Context, clusterRole *types.ClusterRole) error
- func (s *MockStore) UpdateClusterRoleBinding(ctx context.Context, clusterRoleBinding *types.ClusterRoleBinding) error
- func (s *MockStore) UpdateEntity(ctx context.Context, e *types.Entity) error
- func (s *MockStore) UpdateEvent(ctx context.Context, event *corev2.Event) (*corev2.Event, *corev2.Event, error)
- func (s *MockStore) UpdateEventFilter(ctx context.Context, filter *types.EventFilter) error
- func (s *MockStore) UpdateFailingKeepalive(ctx context.Context, entity *types.Entity, expiration int64) error
- func (s *MockStore) UpdateHandler(ctx context.Context, handler *types.Handler) error
- func (s *MockStore) UpdateHookConfig(ctx context.Context, hook *types.HookConfig) error
- func (s *MockStore) UpdateJWTSecret(secret []byte) error
- func (s *MockStore) UpdateMutator(ctx context.Context, mutator *types.Mutator) error
- func (s *MockStore) UpdateNamespace(ctx context.Context, org *types.Namespace) error
- func (s *MockStore) UpdateRole(ctx context.Context, role *types.Role) error
- func (s *MockStore) UpdateRoleBinding(ctx context.Context, roleBinding *types.RoleBinding) error
- func (s *MockStore) UpdateSilencedEntry(ctx context.Context, silenced *types.Silenced) error
- func (s *MockStore) UpdateUser(user *types.User) error
- type Ring
- type StoreInitializer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockStore ¶
MockStore is a store used for testing. When using the MockStore in unit tests, stub out the behavior you wish to test against by assigning the appropriate function to the appropriate Func field. If you have forgotten to stub a particular function, the program will panic.
func (*MockStore) AllowTokens ¶
CreateToken ...
func (*MockStore) AuthenticateUser ¶
func (s *MockStore) AuthenticateUser( ctx context.Context, username, password string, ) (*types.User, error)
AuthenticateUser ...
func (*MockStore) CreateClusterID ¶
CreateClusterID ...
func (*MockStore) CreateClusterRole ¶
CreateClusterRole ...
func (*MockStore) CreateClusterRoleBinding ¶
func (s *MockStore) CreateClusterRoleBinding(ctx context.Context, ClusterRoleBinding *types.ClusterRoleBinding) error
CreateClusterRoleBinding ...
func (*MockStore) CreateJWTSecret ¶
CreateJWTSecret ...
func (*MockStore) CreateNamespace ¶
CreateNamespace ...
func (*MockStore) CreateOrUpdateClusterRole ¶
func (s *MockStore) CreateOrUpdateClusterRole(ctx context.Context, clusterRole *types.ClusterRole) error
CreateOrUpdateClusterRole ...
func (*MockStore) CreateOrUpdateClusterRoleBinding ¶
func (s *MockStore) CreateOrUpdateClusterRoleBinding(ctx context.Context, ClusterRoleBinding *types.ClusterRoleBinding) error
CreateOrUpdateClusterRoleBinding ...
func (*MockStore) CreateOrUpdateResource ¶
CreateOrUpdateResource ...
func (*MockStore) CreateOrUpdateRole ¶
CreateOrUpdateRole ...
func (*MockStore) CreateOrUpdateRoleBinding ¶
func (s *MockStore) CreateOrUpdateRoleBinding(ctx context.Context, RoleBinding *types.RoleBinding) error
CreateOrUpdateRoleBinding ...
func (*MockStore) CreateOrUpdateTessenConfig ¶
func (s *MockStore) CreateOrUpdateTessenConfig(ctx context.Context, config *corev2.TessenConfig) error
CreateOrUpdateTessenConfig ...
func (*MockStore) CreateResource ¶
CreateResource ...
func (*MockStore) CreateRole ¶
CreateRole ...
func (*MockStore) CreateRoleBinding ¶
CreateRoleBinding ...
func (*MockStore) CreateUser ¶
CreateUser ...
func (*MockStore) DeleteAssetByName ¶
DeleteAssetByName ...
func (*MockStore) DeleteCheckConfigByName ¶
DeleteCheckConfigByName ...
func (*MockStore) DeleteClusterRole ¶
DeleteClusterRole ...
func (*MockStore) DeleteClusterRoleBinding ¶
DeleteClusterRoleBinding ...
func (*MockStore) DeleteEntity ¶
DeleteEntity ...
func (*MockStore) DeleteEntityByName ¶
DeleteEntityByName ...
func (*MockStore) DeleteEventByEntityCheck ¶
DeleteEventByEntityCheck ...
func (*MockStore) DeleteEventFilterByName ¶
DeleteEventFilterByName ...
func (*MockStore) DeleteFailingKeepalive ¶
DeleteFailingKeepalive ...
func (*MockStore) DeleteHandlerByName ¶
DeleteHandlerByName ...
func (*MockStore) DeleteHookConfigByName ¶
DeleteHookConfigByName ...
func (*MockStore) DeleteMutatorByName ¶
DeleteMutatorByName ...
func (*MockStore) DeleteNamespace ¶
DeleteNamespace ...
func (*MockStore) DeleteResource ¶
DeleteResource ...
func (*MockStore) DeleteRole ¶
DeleteRole ...
func (*MockStore) DeleteRoleBinding ¶
DeleteRoleBinding ...
func (*MockStore) DeleteSilencedEntryByName ¶
DeleteSilencedEntryByName ...
func (*MockStore) DeleteUser ¶
DeleteUser ...
func (*MockStore) DeregisterExtension ¶
func (*MockStore) GetAllUsers ¶
GetAllUsers ...
func (*MockStore) GetAssetByName ¶
GetAssetByName ...
func (*MockStore) GetAssets ¶
func (s *MockStore) GetAssets(ctx context.Context, pred *store.SelectionPredicate) ([]*types.Asset, error)
GetAssets ...
func (*MockStore) GetCheckConfigByName ¶
func (s *MockStore) GetCheckConfigByName(ctx context.Context, name string) (*types.CheckConfig, error)
GetCheckConfigByName ...
func (*MockStore) GetCheckConfigWatcher ¶
func (s *MockStore) GetCheckConfigWatcher(ctx context.Context) <-chan store.WatchEventCheckConfig
GetCheckConfigWatcher ...
func (*MockStore) GetCheckConfigs ¶
func (s *MockStore) GetCheckConfigs(ctx context.Context, pred *store.SelectionPredicate) ([]*types.CheckConfig, error)
GetCheckConfigs ...
func (*MockStore) GetClusterHealth ¶
func (s *MockStore) GetClusterHealth(ctx context.Context, cluster clientv3.Cluster, etcdClientTLSConfig *tls.Config) *types.HealthResponse
GetClusterHealth ...
func (*MockStore) GetClusterID ¶
GetClusterID ...
func (*MockStore) GetClusterRole ¶
GetClusterRole ...
func (*MockStore) GetClusterRoleBinding ¶
func (s *MockStore) GetClusterRoleBinding(ctx context.Context, name string) (*types.ClusterRoleBinding, error)
GetClusterRoleBinding ...
func (*MockStore) GetEntities ¶
func (s *MockStore) GetEntities(ctx context.Context, pred *store.SelectionPredicate) ([]*types.Entity, error)
GetEntities ...
func (*MockStore) GetEntityByName ¶
GetEntityByName ...
func (*MockStore) GetEntityWatcher ¶
func (s *MockStore) GetEntityWatcher(ctx context.Context) <-chan store.WatchEventEntity
GetEntityWatcher
func (*MockStore) GetEventByEntityCheck ¶
func (s *MockStore) GetEventByEntityCheck(ctx context.Context, entityName, checkID string) (*corev2.Event, error)
GetEventByEntityCheck ...
func (*MockStore) GetEventFilterByName ¶
func (s *MockStore) GetEventFilterByName(ctx context.Context, name string) (*types.EventFilter, error)
GetEventFilterByName ...
func (*MockStore) GetEventFilters ¶
func (s *MockStore) GetEventFilters(ctx context.Context, pred *store.SelectionPredicate) ([]*types.EventFilter, error)
GetEventFilters ...
func (*MockStore) GetEvents ¶
func (s *MockStore) GetEvents(ctx context.Context, pred *store.SelectionPredicate) ([]*corev2.Event, error)
GetEvents ...
func (*MockStore) GetEventsByEntity ¶
func (s *MockStore) GetEventsByEntity(ctx context.Context, entityName string, pred *store.SelectionPredicate) ([]*corev2.Event, error)
GetEventsByEntity ...
func (*MockStore) GetExtension ¶
func (*MockStore) GetExtensions ¶
func (*MockStore) GetFailingKeepalives ¶
GetFailingKeepalives ...
func (*MockStore) GetHandlerByName ¶
GetHandlerByName ...
func (*MockStore) GetHandlers ¶
func (s *MockStore) GetHandlers(ctx context.Context, pred *store.SelectionPredicate) ([]*types.Handler, error)
GetHandlers ...
func (*MockStore) GetHookConfigByName ¶
func (s *MockStore) GetHookConfigByName(ctx context.Context, name string) (*types.HookConfig, error)
GetHookConfigByName ...
func (*MockStore) GetHookConfigs ¶
func (s *MockStore) GetHookConfigs(ctx context.Context, pred *store.SelectionPredicate) ([]*types.HookConfig, error)
GetHookConfigs ...
func (*MockStore) GetJWTSecret ¶
GetJWTSecret ...
func (*MockStore) GetMutatorByName ¶
GetMutatorByName ...
func (*MockStore) GetMutators ¶
func (s *MockStore) GetMutators(ctx context.Context, pred *store.SelectionPredicate) ([]*types.Mutator, error)
GetMutators ...
func (*MockStore) GetNamespace ¶
GetNamespace ...
func (*MockStore) GetResource ¶
GetResource ...
func (*MockStore) GetRoleBinding ¶
GetRoleBinding ...
func (*MockStore) GetSilencedEntries ¶
GetSilencedEntries ...
func (*MockStore) GetSilencedEntriesByCheckName ¶
func (s *MockStore) GetSilencedEntriesByCheckName(ctx context.Context, checkName string) ([]*types.Silenced, error)
GetSilencedEntriesByCheckName ...
func (*MockStore) GetSilencedEntriesByName ¶
func (*MockStore) GetSilencedEntriesBySubscription ¶
func (s *MockStore) GetSilencedEntriesBySubscription(ctx context.Context, subscriptions ...string) ([]*types.Silenced, error)
GetSilencedEntriesBySubscription ...
func (*MockStore) GetSilencedEntryByName ¶
func (s *MockStore) GetSilencedEntryByName(ctx context.Context, silencedID string) (*types.Silenced, error)
GetSilencedEntryByName ...
func (*MockStore) GetTessenConfig ¶
GetTessenConfig ...
func (*MockStore) GetTessenConfigWatcher ¶
func (s *MockStore) GetTessenConfigWatcher(ctx context.Context) <-chan store.WatchEventTessenConfig
GetTessenConfigWatcher ...
func (*MockStore) ListClusterRoleBindings ¶
func (s *MockStore) ListClusterRoleBindings(ctx context.Context, pred *store.SelectionPredicate) ([]*types.ClusterRoleBinding, error)
ListClusterRoleBindings ...
func (*MockStore) ListClusterRoles ¶
func (s *MockStore) ListClusterRoles(ctx context.Context, pred *store.SelectionPredicate) ([]*types.ClusterRole, error)
ListClusterRoles ...
func (*MockStore) ListNamespaces ¶
func (s *MockStore) ListNamespaces(ctx context.Context, pred *store.SelectionPredicate) ([]*types.Namespace, error)
ListNamespaces ...
func (*MockStore) ListResources ¶
func (s *MockStore) ListResources(ctx context.Context, kind string, list interface{}, pred *store.SelectionPredicate) error
ListResources ...
func (*MockStore) ListRoleBindings ¶
func (s *MockStore) ListRoleBindings(ctx context.Context, pred *store.SelectionPredicate) ([]*types.RoleBinding, error)
ListRoleBindings ...
func (*MockStore) ListRoles ¶
func (s *MockStore) ListRoles(ctx context.Context, pred *store.SelectionPredicate) ([]*types.Role, error)
ListRoles ...
func (*MockStore) NewInitializer ¶
func (store *MockStore) NewInitializer() (store.Initializer, error)
NewInitializer ...
func (*MockStore) RegisterExtension ¶
func (*MockStore) RevokeTokens ¶
RevokeTokens ...
func (*MockStore) UpdateAsset ¶
UpdateAsset ...
func (*MockStore) UpdateCheckConfig ¶
UpdateCheckConfig ...
func (*MockStore) UpdateClusterRole ¶
UpdateClusterRole ...
func (*MockStore) UpdateClusterRoleBinding ¶
func (s *MockStore) UpdateClusterRoleBinding(ctx context.Context, clusterRoleBinding *types.ClusterRoleBinding) error
UpdateClusterRoleBinding ...
func (*MockStore) UpdateEntity ¶
UpdateEntity ...
func (*MockStore) UpdateEvent ¶
func (s *MockStore) UpdateEvent(ctx context.Context, event *corev2.Event) (*corev2.Event, *corev2.Event, error)
UpdateEvent ...
func (*MockStore) UpdateEventFilter ¶
UpdateEventFilter ...
func (*MockStore) UpdateFailingKeepalive ¶
func (s *MockStore) UpdateFailingKeepalive(ctx context.Context, entity *types.Entity, expiration int64) error
UpdateFailingKeepalive ...
func (*MockStore) UpdateHandler ¶
UpdateHandler ...
func (*MockStore) UpdateHookConfig ¶
UpdateHookConfig ...
func (*MockStore) UpdateJWTSecret ¶
UpdateJWTSecret ...
func (*MockStore) UpdateMutator ¶
UpdateMutator ...
func (*MockStore) UpdateNamespace ¶
UpdateNamespace ...
func (*MockStore) UpdateRole ¶
UpdateRole ...
func (*MockStore) UpdateRoleBinding ¶
UpdateRoleBinding ...
func (*MockStore) UpdateSilencedEntry ¶
UpdateSilencedEntry ...
type StoreInitializer ¶
StoreInitializer ...
func (*StoreInitializer) FlagAsInitialized ¶
func (s *StoreInitializer) FlagAsInitialized() error
FlagAsInitialized ...
func (*StoreInitializer) IsInitialized ¶
func (s *StoreInitializer) IsInitialized() (bool, error)
IsInitialized ...
Source Files ¶
- assets.go
- authentication.go
- check_config.go
- cluster_id.go
- clusterrole.go
- clusterrolebinding.go
- entities.go
- events.go
- extension.go
- filters.go
- handlers.go
- health.go
- hook_config.go
- initialization.go
- keepalives.go
- mock.go
- mutators.go
- namespaces.go
- resource.go
- ring.go
- role.go
- rolebinding.go
- silenced.go
- tessen.go
- token.go
- users.go