Documentation
¶
Overview ¶
Package mock_externalsvc is a generated GoMock package.
Index ¶
- Constants
- func GenerateAPIKeyJWT(userID uint64, jwtID string) (string, error)
- func GenerateSessionJWT(userID uint64) (string, error)
- func GenerateWebhookJWT(url string, secret []byte) (string, error)
- func New(authToken string) *external
- func ParseAPIKeyJWT(tokenString string) (uint64, string, error)
- func ParseSessionJWT(tokenString string) (uint64, error)
- type External
- type MockExternal
- type MockExternalMockRecorder
- type VerificationResult
- type VerificationResults
Constants ¶
View Source
const ( ExpirationKey = "exp" UserIDKey = "uid" IssuerKey = "iss" JWTIDKey = "jti" AudienceKey = "aud" SessionDuration = 8760 * time.Hour // 1 year )
Variables ¶
This section is empty.
Functions ¶
func GenerateSessionJWT ¶
func ParseSessionJWT ¶
Types ¶
type External ¶
type External interface {
Verify(reg *registrysvc.Registration, resp verification.TaskResponse) (VerificationResults, error)
}
type MockExternal ¶
type MockExternal struct {
// contains filtered or unexported fields
}
MockExternal is a mock of External interface
func NewMockExternal ¶
func NewMockExternal(ctrl *gomock.Controller) *MockExternal
NewMockExternal creates a new mock instance
func (*MockExternal) EXPECT ¶
func (m *MockExternal) EXPECT() *MockExternalMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockExternal) Verify ¶
func (m *MockExternal) Verify(reg *registrysvc.Registration, r verification.TaskResponse) (VerificationResults, error)
Verify mocks base method
type MockExternalMockRecorder ¶
type MockExternalMockRecorder struct {
// contains filtered or unexported fields
}
MockExternalMockRecorder is the mock recorder for MockExternal
func (*MockExternalMockRecorder) Verify ¶
func (mr *MockExternalMockRecorder) Verify(reg, r interface{}) *gomock.Call
Verify indicates an expected call of Verify
type VerificationResult ¶
type VerificationResult struct { JobID uint64 `json:"job_id"` TaskID uint64 `json:"task_id"` WorkerID uint64 `json:"worker_id"` ResponseID uint64 `json:"response_id"` Accepted bool `json:"accepted"` }
func (*VerificationResult) ToVerificationResponse ¶
func (vr *VerificationResult) ToVerificationResponse() verification.VerificationResponse
type VerificationResults ¶
type VerificationResults []VerificationResult
func (VerificationResults) ToVerificationResponses ¶
func (vrs VerificationResults) ToVerificationResponses() verification.VerificationResponses
Click to show internal directories.
Click to hide internal directories.