Documentation ¶
Index ¶
- func CreatePermit(authorityNodeRef reference.Holder, reconnectHost *legacyhost.Host, ...) (*rms.Permit, error)
- func ValidatePermit(permit *rms.Permit, cert nodeinfo.Certificate, verifier cryptography.Service) error
- type Requester
- type RequesterMock
- func (mmAuthorize *RequesterMock) Authorize(ctx context.Context, c2 nodeinfo.Certificate) (pp1 *rms.Permit, err error)
- func (mmAuthorize *RequesterMock) AuthorizeAfterCounter() uint64
- func (mmAuthorize *RequesterMock) AuthorizeBeforeCounter() uint64
- func (mmBootstrap *RequesterMock) Bootstrap(ctx context.Context, pp1 *rms.Permit, c2 adapters.Candidate) (bp1 *rms.BootstrapResponse, err error)
- func (mmBootstrap *RequesterMock) BootstrapAfterCounter() uint64
- func (mmBootstrap *RequesterMock) BootstrapBeforeCounter() uint64
- func (m *RequesterMock) MinimockAuthorizeDone() bool
- func (m *RequesterMock) MinimockAuthorizeInspect()
- func (m *RequesterMock) MinimockBootstrapDone() bool
- func (m *RequesterMock) MinimockBootstrapInspect()
- func (m *RequesterMock) MinimockFinish()
- func (m *RequesterMock) MinimockReconnectDone() bool
- func (m *RequesterMock) MinimockReconnectInspect()
- func (m *RequesterMock) MinimockUpdateScheduleDone() bool
- func (m *RequesterMock) MinimockUpdateScheduleInspect()
- func (m *RequesterMock) MinimockWait(timeout mm_time.Duration)
- func (mmReconnect *RequesterMock) Reconnect(ctx context.Context, hp1 *legacyhost.Host, pp1 *rms.Permit) (rp1 *rms.ReconnectResponse, err error)
- func (mmReconnect *RequesterMock) ReconnectAfterCounter() uint64
- func (mmReconnect *RequesterMock) ReconnectBeforeCounter() uint64
- func (mmUpdateSchedule *RequesterMock) UpdateSchedule(ctx context.Context, pp1 *rms.Permit, n1 pulse.Number) (up1 *rms.UpdateScheduleResponse, err error)
- func (mmUpdateSchedule *RequesterMock) UpdateScheduleAfterCounter() uint64
- func (mmUpdateSchedule *RequesterMock) UpdateScheduleBeforeCounter() uint64
- type RequesterMockAuthorizeExpectation
- type RequesterMockAuthorizeParams
- type RequesterMockAuthorizeResults
- type RequesterMockBootstrapExpectation
- type RequesterMockBootstrapParams
- type RequesterMockBootstrapResults
- type RequesterMockReconnectExpectation
- type RequesterMockReconnectParams
- type RequesterMockReconnectResults
- type RequesterMockUpdateScheduleExpectation
- type RequesterMockUpdateScheduleParams
- type RequesterMockUpdateScheduleResults
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePermit ¶
func CreatePermit(authorityNodeRef reference.Holder, reconnectHost *legacyhost.Host, joinerPublicKey []byte, signer cryptography.Signer) (*rms.Permit, error)
CreatePermit creates permit as signed protobuf for joiner node to
func ValidatePermit ¶
func ValidatePermit(permit *rms.Permit, cert nodeinfo.Certificate, verifier cryptography.Service) error
ValidatePermit validate granted permit and verifies signature of Authority Node
Types ¶
type Requester ¶
type Requester interface { Authorize(context.Context, nodeinfo.Certificate) (*rms.Permit, error) Bootstrap(context.Context, *rms.Permit, adapters.Candidate) (*rms.BootstrapResponse, error) UpdateSchedule(context.Context, *rms.Permit, pulse.Number) (*rms.UpdateScheduleResponse, error) Reconnect(context.Context, *legacyhost.Host, *rms.Permit) (*rms.ReconnectResponse, error) }
func NewRequester ¶
type RequesterMock ¶
type RequesterMock struct { AuthorizeMock mRequesterMockAuthorize BootstrapMock mRequesterMockBootstrap ReconnectMock mRequesterMockReconnect UpdateScheduleMock mRequesterMockUpdateSchedule // contains filtered or unexported fields }
RequesterMock implements Requester
func NewRequesterMock ¶
func NewRequesterMock(t minimock.Tester) *RequesterMock
NewRequesterMock returns a mock for Requester
func (*RequesterMock) Authorize ¶
func (mmAuthorize *RequesterMock) Authorize(ctx context.Context, c2 nodeinfo.Certificate) (pp1 *rms.Permit, err error)
Authorize implements Requester
func (*RequesterMock) AuthorizeAfterCounter ¶
func (mmAuthorize *RequesterMock) AuthorizeAfterCounter() uint64
AuthorizeAfterCounter returns a count of finished RequesterMock.Authorize invocations
func (*RequesterMock) AuthorizeBeforeCounter ¶
func (mmAuthorize *RequesterMock) AuthorizeBeforeCounter() uint64
AuthorizeBeforeCounter returns a count of RequesterMock.Authorize invocations
func (*RequesterMock) Bootstrap ¶
func (mmBootstrap *RequesterMock) Bootstrap(ctx context.Context, pp1 *rms.Permit, c2 adapters.Candidate) (bp1 *rms.BootstrapResponse, err error)
Bootstrap implements Requester
func (*RequesterMock) BootstrapAfterCounter ¶
func (mmBootstrap *RequesterMock) BootstrapAfterCounter() uint64
BootstrapAfterCounter returns a count of finished RequesterMock.Bootstrap invocations
func (*RequesterMock) BootstrapBeforeCounter ¶
func (mmBootstrap *RequesterMock) BootstrapBeforeCounter() uint64
BootstrapBeforeCounter returns a count of RequesterMock.Bootstrap invocations
func (*RequesterMock) MinimockAuthorizeDone ¶
func (m *RequesterMock) MinimockAuthorizeDone() bool
MinimockAuthorizeDone returns true if the count of the Authorize invocations corresponds the number of defined expectations
func (*RequesterMock) MinimockAuthorizeInspect ¶
func (m *RequesterMock) MinimockAuthorizeInspect()
MinimockAuthorizeInspect logs each unmet expectation
func (*RequesterMock) MinimockBootstrapDone ¶
func (m *RequesterMock) MinimockBootstrapDone() bool
MinimockBootstrapDone returns true if the count of the Bootstrap invocations corresponds the number of defined expectations
func (*RequesterMock) MinimockBootstrapInspect ¶
func (m *RequesterMock) MinimockBootstrapInspect()
MinimockBootstrapInspect logs each unmet expectation
func (*RequesterMock) MinimockFinish ¶
func (m *RequesterMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*RequesterMock) MinimockReconnectDone ¶
func (m *RequesterMock) MinimockReconnectDone() bool
MinimockReconnectDone returns true if the count of the Reconnect invocations corresponds the number of defined expectations
func (*RequesterMock) MinimockReconnectInspect ¶
func (m *RequesterMock) MinimockReconnectInspect()
MinimockReconnectInspect logs each unmet expectation
func (*RequesterMock) MinimockUpdateScheduleDone ¶
func (m *RequesterMock) MinimockUpdateScheduleDone() bool
MinimockUpdateScheduleDone returns true if the count of the UpdateSchedule invocations corresponds the number of defined expectations
func (*RequesterMock) MinimockUpdateScheduleInspect ¶
func (m *RequesterMock) MinimockUpdateScheduleInspect()
MinimockUpdateScheduleInspect logs each unmet expectation
func (*RequesterMock) MinimockWait ¶
func (m *RequesterMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*RequesterMock) Reconnect ¶
func (mmReconnect *RequesterMock) Reconnect(ctx context.Context, hp1 *legacyhost.Host, pp1 *rms.Permit) (rp1 *rms.ReconnectResponse, err error)
Reconnect implements Requester
func (*RequesterMock) ReconnectAfterCounter ¶
func (mmReconnect *RequesterMock) ReconnectAfterCounter() uint64
ReconnectAfterCounter returns a count of finished RequesterMock.Reconnect invocations
func (*RequesterMock) ReconnectBeforeCounter ¶
func (mmReconnect *RequesterMock) ReconnectBeforeCounter() uint64
ReconnectBeforeCounter returns a count of RequesterMock.Reconnect invocations
func (*RequesterMock) UpdateSchedule ¶
func (mmUpdateSchedule *RequesterMock) UpdateSchedule(ctx context.Context, pp1 *rms.Permit, n1 pulse.Number) (up1 *rms.UpdateScheduleResponse, err error)
UpdateSchedule implements Requester
func (*RequesterMock) UpdateScheduleAfterCounter ¶
func (mmUpdateSchedule *RequesterMock) UpdateScheduleAfterCounter() uint64
UpdateScheduleAfterCounter returns a count of finished RequesterMock.UpdateSchedule invocations
func (*RequesterMock) UpdateScheduleBeforeCounter ¶
func (mmUpdateSchedule *RequesterMock) UpdateScheduleBeforeCounter() uint64
UpdateScheduleBeforeCounter returns a count of RequesterMock.UpdateSchedule invocations
type RequesterMockAuthorizeExpectation ¶
type RequesterMockAuthorizeExpectation struct { Counter uint64 // contains filtered or unexported fields }
RequesterMockAuthorizeExpectation specifies expectation struct of the Requester.Authorize
func (*RequesterMockAuthorizeExpectation) Then ¶
func (e *RequesterMockAuthorizeExpectation) Then(pp1 *rms.Permit, err error) *RequesterMock
Then sets up Requester.Authorize return parameters for the expectation previously defined by the When method
type RequesterMockAuthorizeParams ¶
type RequesterMockAuthorizeParams struct {
// contains filtered or unexported fields
}
RequesterMockAuthorizeParams contains parameters of the Requester.Authorize
type RequesterMockAuthorizeResults ¶
type RequesterMockAuthorizeResults struct {
// contains filtered or unexported fields
}
RequesterMockAuthorizeResults contains results of the Requester.Authorize
type RequesterMockBootstrapExpectation ¶
type RequesterMockBootstrapExpectation struct { Counter uint64 // contains filtered or unexported fields }
RequesterMockBootstrapExpectation specifies expectation struct of the Requester.Bootstrap
func (*RequesterMockBootstrapExpectation) Then ¶
func (e *RequesterMockBootstrapExpectation) Then(bp1 *rms.BootstrapResponse, err error) *RequesterMock
Then sets up Requester.Bootstrap return parameters for the expectation previously defined by the When method
type RequesterMockBootstrapParams ¶
type RequesterMockBootstrapParams struct {
// contains filtered or unexported fields
}
RequesterMockBootstrapParams contains parameters of the Requester.Bootstrap
type RequesterMockBootstrapResults ¶
type RequesterMockBootstrapResults struct {
// contains filtered or unexported fields
}
RequesterMockBootstrapResults contains results of the Requester.Bootstrap
type RequesterMockReconnectExpectation ¶
type RequesterMockReconnectExpectation struct { Counter uint64 // contains filtered or unexported fields }
RequesterMockReconnectExpectation specifies expectation struct of the Requester.Reconnect
func (*RequesterMockReconnectExpectation) Then ¶
func (e *RequesterMockReconnectExpectation) Then(rp1 *rms.ReconnectResponse, err error) *RequesterMock
Then sets up Requester.Reconnect return parameters for the expectation previously defined by the When method
type RequesterMockReconnectParams ¶
type RequesterMockReconnectParams struct {
// contains filtered or unexported fields
}
RequesterMockReconnectParams contains parameters of the Requester.Reconnect
type RequesterMockReconnectResults ¶
type RequesterMockReconnectResults struct {
// contains filtered or unexported fields
}
RequesterMockReconnectResults contains results of the Requester.Reconnect
type RequesterMockUpdateScheduleExpectation ¶
type RequesterMockUpdateScheduleExpectation struct { Counter uint64 // contains filtered or unexported fields }
RequesterMockUpdateScheduleExpectation specifies expectation struct of the Requester.UpdateSchedule
func (*RequesterMockUpdateScheduleExpectation) Then ¶
func (e *RequesterMockUpdateScheduleExpectation) Then(up1 *rms.UpdateScheduleResponse, err error) *RequesterMock
Then sets up Requester.UpdateSchedule return parameters for the expectation previously defined by the When method
type RequesterMockUpdateScheduleParams ¶
type RequesterMockUpdateScheduleParams struct {
// contains filtered or unexported fields
}
RequesterMockUpdateScheduleParams contains parameters of the Requester.UpdateSchedule
type RequesterMockUpdateScheduleResults ¶
type RequesterMockUpdateScheduleResults struct {
// contains filtered or unexported fields
}
RequesterMockUpdateScheduleResults contains results of the Requester.UpdateSchedule