Documentation ¶
Overview ¶
Package mock provides a mock implementation for the access control functionalities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(o ...Option) accesscontrol.Controller
New creates a new mock accesscontrol Controller.
Types ¶
type GranteeListMock ¶
type GranteeListStructMock ¶
type GranteeListStructMock struct {
// contains filtered or unexported fields
}
func NewGranteeList ¶
func NewGranteeList() *GranteeListStructMock
func (*GranteeListStructMock) Add ¶
func (g *GranteeListStructMock) Add(addList []*ecdsa.PublicKey) error
func (*GranteeListStructMock) Get ¶
func (g *GranteeListStructMock) Get() []*ecdsa.PublicKey
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option is an option passed to a mock accesscontrol Controller.
func WithAcceptAll ¶
func WithAcceptAll() Option
WithAcceptAll sets the mock to return fixed references on every call to DownloadHandler.
func WithHistory ¶
func WithHistory(h accesscontrol.History, ref string) Option
WithHistory sets the mock to use the given history reference.
func WithPublisher ¶
WithPublisher sets the mock to use the given reference as the publisher address.
type SessionMock ¶
type SessionMock struct { KeyFunc func(publicKey *ecdsa.PublicKey, nonces [][]byte) ([][]byte, error) // contains filtered or unexported fields }
func NewFromKeystore ¶
func NewSessionMock ¶
func NewSessionMock(key *ecdsa.PrivateKey) *SessionMock
Click to show internal directories.
Click to hide internal directories.