Documentation ¶
Overview ¶
Package test is a test helper for the other packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RestrictAllowed ¶
RestrictAllowed is a restricter that allows everything
func RestrictNotAllowed ¶
RestrictNotAllowed is a restricter that removes everythin
Types ¶
type Auth ¶
type Auth int
Auth implements the http.Authenticater interface. It allways returs the given user id.
func (Auth) Authenticate ¶
Authenticate does nothing.
type KeysBuilder ¶
type KeysBuilder struct {
K []string
}
KeysBuilder is a mock that impelements the autoupdate.KeysBuilder interface.
type MockPermission ¶
type MockPermission struct { Data map[string]bool Called map[string]bool Default bool // contains filtered or unexported fields }
MockPermission mocks the permission api.
func (*MockPermission) RestrictFQFields ¶
func (p *MockPermission) RestrictFQFields(ctx context.Context, uid int, fqids []string) (map[string]bool, error)
RestrictFQFields returns the fields where p.Data is true.
Click to show internal directories.
Click to hide internal directories.