Documentation ¶
Index ¶
- Variables
- type HTTPMiddleware
- type MockService
- func (_m *MockService) GenerateMasterKey(ctx context.Context, password *secret.Text) error
- func (_m *MockService) IsMasterKeyLoaded() bool
- func (_m *MockService) IsMasterKeyRegistered(ctx context.Context) (bool, error)
- func (_m *MockService) LoadMasterKeyFromPassword(ctx context.Context, password *secret.Text) error
- func (_m *MockService) Open(key *secret.SealedKey) (*secret.Key, error)
- func (_m *MockService) SealKey(key *secret.Key) (*secret.SealedKey, error)
- type PasswordSource
- type Service
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type HTTPMiddleware ¶
type HTTPMiddleware struct {
// contains filtered or unexported fields
}
func NewHTTPMiddleware ¶
func NewHTTPMiddleware(masterkey Service, html html.Writer) *HTTPMiddleware
type MockService ¶
MockService is an autogenerated mock type for the Service type
func NewMockService ¶
func NewMockService(t interface { mock.TestingT Cleanup(func()) }) *MockService
NewMockService creates a new instance of MockService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockService) GenerateMasterKey ¶
GenerateMasterKey provides a mock function with given fields: ctx, password
func (*MockService) IsMasterKeyLoaded ¶
func (_m *MockService) IsMasterKeyLoaded() bool
IsMasterKeyLoaded provides a mock function with given fields:
func (*MockService) IsMasterKeyRegistered ¶
func (_m *MockService) IsMasterKeyRegistered(ctx context.Context) (bool, error)
IsMasterKeyRegistered provides a mock function with given fields: ctx
func (*MockService) LoadMasterKeyFromPassword ¶
LoadMasterKeyFromPassword provides a mock function with given fields: ctx, password
type PasswordSource ¶
type PasswordSource string
type Service ¶
type Service interface { GenerateMasterKey(ctx context.Context, password *secret.Text) error LoadMasterKeyFromPassword(ctx context.Context, password *secret.Text) error IsMasterKeyLoaded() bool IsMasterKeyRegistered(ctx context.Context) (bool, error) SealKey(key *secret.Key) (*secret.SealedKey, error) Open(key *secret.SealedKey) (*secret.Key, error) }
Click to show internal directories.
Click to hide internal directories.