types

package
v6.2.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package types is a generated GoMock package.

Index

Constants

View Source
const SessionCancelled = "cancelled"
View Source
const SessionCompleted = "completed"

SessionCompleted represents the session state after the user has accepted the contract

View Source
const SessionCreated = "created"

SessionCreated represents the session state after creation

View Source
const SessionErrored = "errored"
View Source
const SessionExpired = "expired"
View Source
const SessionInProgress = "in-progress"

SessionInProgress represents the session state after rendering the html

View Source
const SessionVPRequested = "vp-requested"

Variables

This section is empty.

Functions

This section is empty.

Types

type Employee

type Employee struct {
	Identifier string
	Initials   string
	FamilyName string
	RoleName   *string
}

type EmployeeIdentityCredentialMember

type EmployeeIdentityCredentialMember struct {
	Identifier string                                 `json:"identifier"`
	Member     EmployeeIdentityCredentialMemberMember `json:"member"`
	RoleName   *string                                `json:"roleName,omitempty"`
	Type       string                                 `json:"type"`
}

type EmployeeIdentityCredentialMemberMember

type EmployeeIdentityCredentialMemberMember struct {
	FamilyName string `json:"familyName"`
	Initials   string `json:"initials"`
	Type       string `json:"type"`
}

type EmployeeIdentityCredentialSubject

type EmployeeIdentityCredentialSubject struct {
	credential.BaseCredentialSubject
	Type   string                           `json:"type"`
	Member EmployeeIdentityCredentialMember `json:"member"`
}

type MockSessionStore

type MockSessionStore struct {
	// contains filtered or unexported fields
}

MockSessionStore is a mock of SessionStore interface.

func NewMockSessionStore

func NewMockSessionStore(ctrl *gomock.Controller) *MockSessionStore

NewMockSessionStore creates a new mock instance.

func (*MockSessionStore) CheckAndSetStatus

func (m *MockSessionStore) CheckAndSetStatus(sessionID, expectedStatus, status string) bool

CheckAndSetStatus mocks base method.

func (*MockSessionStore) Delete

func (m *MockSessionStore) Delete(sessionID string)

Delete mocks base method.

func (*MockSessionStore) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockSessionStore) Load

func (m *MockSessionStore) Load(sessionID string) (Session, bool)

Load mocks base method.

func (*MockSessionStore) Start

func (m *MockSessionStore) Start(ctx context.Context)

Start mocks base method.

func (*MockSessionStore) Store

func (m *MockSessionStore) Store(sessionID string, session Session)

Store mocks base method.

type MockSessionStoreMockRecorder

type MockSessionStoreMockRecorder struct {
	// contains filtered or unexported fields
}

MockSessionStoreMockRecorder is the mock recorder for MockSessionStore.

func (*MockSessionStoreMockRecorder) CheckAndSetStatus

func (mr *MockSessionStoreMockRecorder) CheckAndSetStatus(sessionID, expectedStatus, status any) *gomock.Call

CheckAndSetStatus indicates an expected call of CheckAndSetStatus.

func (*MockSessionStoreMockRecorder) Delete

func (mr *MockSessionStoreMockRecorder) Delete(sessionID any) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockSessionStoreMockRecorder) Load

func (mr *MockSessionStoreMockRecorder) Load(sessionID any) *gomock.Call

Load indicates an expected call of Load.

func (*MockSessionStoreMockRecorder) Start

func (mr *MockSessionStoreMockRecorder) Start(ctx any) *gomock.Call

Start indicates an expected call of Start.

func (*MockSessionStoreMockRecorder) Store

func (mr *MockSessionStoreMockRecorder) Store(sessionID, session any) *gomock.Call

Store indicates an expected call of Store.

type Session

type Session struct {
	ExpiresAt time.Time
	Contract  string
	Secret    string
	Status    string
	Employer  string
	Employee  Employee
}

Session contains the contract text and Session signing Status

func (Session) CredentialSubject

func (s Session) CredentialSubject() []map[string]any

func (Session) HumanReadableContract

func (s Session) HumanReadableContract() string

HumanReadableContract returns the contract text without the contract type (e.g. "NL:LoginContract:v3")

type SessionStore

type SessionStore interface {
	Start(ctx context.Context)
	Store(sessionID string, session Session)
	Load(sessionID string) (Session, bool)
	CheckAndSetStatus(sessionID string, expectedStatus, status string) bool
	Delete(sessionID string)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL