fixture

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenFixture

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

func NewAccessTokenFixture

func NewAccessTokenFixture(db storage.DBTX, defaultEntity storage.AccessToken) *AccessTokenFixture

func (*AccessTokenFixture) AccountID

func (f *AccessTokenFixture) AccountID(accountID uuid.UUID) *AccessTokenFixture

func (*AccessTokenFixture) Cleanup

Cleanup calls testing.TB.Cleanup() function with providing a callback inside it. This callback will delete a record from the table by primary key when test will be finished.

func (*AccessTokenFixture) Create

func (*AccessTokenFixture) CreatedAt

func (f *AccessTokenFixture) CreatedAt(createdAt time.Time) *AccessTokenFixture

func (*AccessTokenFixture) Data

func (f *AccessTokenFixture) Data(data []byte) *AccessTokenFixture

func (*AccessTokenFixture) ExpiresAt

func (f *AccessTokenFixture) ExpiresAt(expiresAt time.Time) *AccessTokenFixture

func (*AccessTokenFixture) GetEntity

func (f *AccessTokenFixture) GetEntity() storage.AccessToken

func (*AccessTokenFixture) Hash

func (*AccessTokenFixture) IdentityID

func (f *AccessTokenFixture) IdentityID(identityID uuid.UUID) *AccessTokenFixture

func (*AccessTokenFixture) PullUpdates

func (f *AccessTokenFixture) PullUpdates(tb testing.TB) *AccessTokenFixture

func (*AccessTokenFixture) PushUpdates

func (f *AccessTokenFixture) PushUpdates(tb testing.TB) *AccessTokenFixture

func (*AccessTokenFixture) RevokedAt

func (f *AccessTokenFixture) RevokedAt(revokedAt null.Time) *AccessTokenFixture

func (*AccessTokenFixture) Roles

func (f *AccessTokenFixture) Roles(roles []string) *AccessTokenFixture

func (*AccessTokenFixture) SessionID

func (f *AccessTokenFixture) SessionID(sessionID uuid.UUID) *AccessTokenFixture

type AccountFixture

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

func NewAccountFixture

func NewAccountFixture(db storage.DBTX, defaultEntity storage.Account) *AccountFixture

func (*AccountFixture) Cleanup

func (f *AccountFixture) Cleanup(tb testing.TB) *AccountFixture

Cleanup calls testing.TB.Cleanup() function with providing a callback inside it. This callback will delete a record from the table by primary key when test will be finished.

func (*AccountFixture) Create

func (f *AccountFixture) Create(tb testing.TB) *AccountFixture

func (*AccountFixture) CreatedAt

func (f *AccountFixture) CreatedAt(createdAt time.Time) *AccountFixture

func (*AccountFixture) Data

func (f *AccountFixture) Data(data []byte) *AccountFixture

func (*AccountFixture) GetEntity

func (f *AccountFixture) GetEntity() storage.Account

func (*AccountFixture) ID

func (*AccountFixture) PullUpdates

func (f *AccountFixture) PullUpdates(tb testing.TB) *AccountFixture

func (*AccountFixture) PushUpdates

func (f *AccountFixture) PushUpdates(tb testing.TB) *AccountFixture

func (*AccountFixture) Roles

func (f *AccountFixture) Roles(roles []string) *AccountFixture

func (*AccountFixture) Status

func (*AccountFixture) UpdatedAt

func (f *AccountFixture) UpdatedAt(updatedAt time.Time) *AccountFixture

type CredentialFixture

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

func NewCredentialFixture

func NewCredentialFixture(db storage.DBTX, defaultEntity storage.Credential) *CredentialFixture

func (*CredentialFixture) AccountID

func (f *CredentialFixture) AccountID(accountID uuid.UUID) *CredentialFixture

func (*CredentialFixture) Cleanup

Cleanup calls testing.TB.Cleanup() function with providing a callback inside it. This callback will delete a record from the table by primary key when test will be finished.

func (*CredentialFixture) CleanupAllOfAccount

func (f *CredentialFixture) CleanupAllOfAccount(tb testing.TB) *CredentialFixture

CleanupAllOfAccount calls testing.TB.Cleanup() function with providing a callback inside it. This callback will delete all records from the table by the IdentityID field.

func (*CredentialFixture) Create

func (*CredentialFixture) CreatedAt

func (f *CredentialFixture) CreatedAt(createdAt time.Time) *CredentialFixture

func (*CredentialFixture) ExpiredAt

func (f *CredentialFixture) ExpiredAt(expiredAt null.Time) *CredentialFixture

func (*CredentialFixture) GetEntity

func (f *CredentialFixture) GetEntity() storage.Credential

func (*CredentialFixture) Hash

func (*CredentialFixture) PullUpdates

func (f *CredentialFixture) PullUpdates(tb testing.TB) *CredentialFixture

func (*CredentialFixture) PushUpdates

func (f *CredentialFixture) PushUpdates(tb testing.TB) *CredentialFixture

func (*CredentialFixture) Type

type FixturesFactory

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

func NewFixturesFactory

func NewFixturesFactory(db storage.DBTX) *FixturesFactory

func (*FixturesFactory) AccessToken

func (f *FixturesFactory) AccessToken() *AccessTokenFixture

func (*FixturesFactory) Account

func (f *FixturesFactory) Account() *AccountFixture

func (*FixturesFactory) Credential

func (f *FixturesFactory) Credential() *CredentialFixture

func (*FixturesFactory) Identity

func (f *FixturesFactory) Identity() *IdentityFixture

func (*FixturesFactory) RefreshToken

func (f *FixturesFactory) RefreshToken() *RefreshTokenFixture

func (*FixturesFactory) ResetPasswordRequest

func (f *FixturesFactory) ResetPasswordRequest() *ResetPasswordRequestFixture

func (*FixturesFactory) Session

func (f *FixturesFactory) Session() *SessionFixture

type IdentityFixture

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

func NewIdentityFixture

func NewIdentityFixture(db storage.DBTX, defaultEntity storage.Identity) *IdentityFixture

func (*IdentityFixture) AccountID

func (f *IdentityFixture) AccountID(accountID uuid.UUID) *IdentityFixture

func (*IdentityFixture) Cleanup

func (f *IdentityFixture) Cleanup(tb testing.TB) *IdentityFixture

Cleanup calls testing.TB.Cleanup() function with providing a callback inside it. This callback will delete a record from the table by primary key when test will be finished.

func (*IdentityFixture) CleanupAllOfAccount

func (f *IdentityFixture) CleanupAllOfAccount(tb testing.TB) *IdentityFixture

CleanupAllOfAccount calls testing.TB.Cleanup() function with providing a callback inside it. This callback will delete all records from the table by the UserID field.

func (*IdentityFixture) Create

func (f *IdentityFixture) Create(tb testing.TB) *IdentityFixture

func (*IdentityFixture) CreatedAt

func (f *IdentityFixture) CreatedAt(createdAt time.Time) *IdentityFixture

func (*IdentityFixture) Data

func (f *IdentityFixture) Data(data []byte) *IdentityFixture

func (*IdentityFixture) GetEntity

func (f *IdentityFixture) GetEntity() storage.Identity

func (*IdentityFixture) ID

func (*IdentityFixture) Identity

func (f *IdentityFixture) Identity(identity string) *IdentityFixture

func (*IdentityFixture) PullUpdates

func (f *IdentityFixture) PullUpdates(tb testing.TB) *IdentityFixture

func (*IdentityFixture) PullUpdatesLastAccountIdentity

func (f *IdentityFixture) PullUpdatesLastAccountIdentity(tb testing.TB) *IdentityFixture

PullUpdatesLastAccountIdentity gets the last Identity of the account and updates the fixture entity. This method is useful when you need to get the data from the database after registering the account, when you don't have identity ID

func (*IdentityFixture) PushUpdates

func (f *IdentityFixture) PushUpdates(tb testing.TB) *IdentityFixture

func (*IdentityFixture) Status

func (*IdentityFixture) Type

func (f *IdentityFixture) Type(typ string) *IdentityFixture

func (*IdentityFixture) UpdatedAt

func (f *IdentityFixture) UpdatedAt(updatedAt time.Time) *IdentityFixture

type RefreshTokenFixture

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

func NewRefreshTokenFixture

func NewRefreshTokenFixture(db storage.DBTX, defaultEntity storage.RefreshToken) *RefreshTokenFixture

func (*RefreshTokenFixture) Cleanup

Cleanup calls testing.TB.Cleanup() function with providing a callback inside it. This callback will delete a record from the table by primary key when test will be finished.

func (*RefreshTokenFixture) Create

func (*RefreshTokenFixture) CreatedAt

func (f *RefreshTokenFixture) CreatedAt(createdAt time.Time) *RefreshTokenFixture

func (*RefreshTokenFixture) ExpiresAt

func (f *RefreshTokenFixture) ExpiresAt(expiresAt time.Time) *RefreshTokenFixture

func (*RefreshTokenFixture) GetEntity

func (f *RefreshTokenFixture) GetEntity() storage.RefreshToken

func (*RefreshTokenFixture) Hash

func (*RefreshTokenFixture) IdentityID

func (f *RefreshTokenFixture) IdentityID(identityID uuid.UUID) *RefreshTokenFixture

func (*RefreshTokenFixture) PullUpdates

func (f *RefreshTokenFixture) PullUpdates(tb testing.TB) *RefreshTokenFixture

func (*RefreshTokenFixture) PushUpdates

func (f *RefreshTokenFixture) PushUpdates(tb testing.TB) *RefreshTokenFixture

func (*RefreshTokenFixture) RevokedAt

func (f *RefreshTokenFixture) RevokedAt(revokedAt null.Time) *RefreshTokenFixture

func (*RefreshTokenFixture) SessionID

func (f *RefreshTokenFixture) SessionID(sessionID uuid.UUID) *RefreshTokenFixture

type ResetPasswordRequestFixture

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

func NewResetPasswordRequestFixture

func NewResetPasswordRequestFixture(db storage.DBTX, defaultEntity storage.ResetPasswordRequest) *ResetPasswordRequestFixture

func (*ResetPasswordRequestFixture) AccountID

func (*ResetPasswordRequestFixture) Cleanup

Cleanup calls testing.TB.Cleanup() function with providing a callback inside it. This callback will delete a record from the table by primary key when test will be finished.

func (*ResetPasswordRequestFixture) Create

func (*ResetPasswordRequestFixture) CreatedAt

func (*ResetPasswordRequestFixture) GetEntity

func (*ResetPasswordRequestFixture) ID

func (*ResetPasswordRequestFixture) LastSendAt

func (*ResetPasswordRequestFixture) PullUpdates

func (*ResetPasswordRequestFixture) PushUpdates

func (*ResetPasswordRequestFixture) Status

func (*ResetPasswordRequestFixture) Token

func (*ResetPasswordRequestFixture) UsedAt

type SessionFixture

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

func NewSessionFixture

func NewSessionFixture(db storage.DBTX, defaultEntity storage.Session) *SessionFixture

func (*SessionFixture) AccountID

func (f *SessionFixture) AccountID(accountID uuid.UUID) *SessionFixture

func (*SessionFixture) Cleanup

func (f *SessionFixture) Cleanup(tb testing.TB) *SessionFixture

Cleanup calls testing.TB.Cleanup() function with providing a callback inside it. This callback will delete a record from the table by primary key when test will be finished.

func (*SessionFixture) Create

func (f *SessionFixture) Create(tb testing.TB) *SessionFixture

func (*SessionFixture) CreatedAt

func (f *SessionFixture) CreatedAt(createdAt time.Time) *SessionFixture

func (*SessionFixture) Data

func (f *SessionFixture) Data(data []byte) *SessionFixture

func (*SessionFixture) ExpiresAt

func (f *SessionFixture) ExpiresAt(expiresAt time.Time) *SessionFixture

func (*SessionFixture) GetEntity

func (f *SessionFixture) GetEntity() storage.Session

func (*SessionFixture) ID

func (*SessionFixture) IdentityID

func (f *SessionFixture) IdentityID(identityID uuid.UUID) *SessionFixture

func (*SessionFixture) PullUpdates

func (f *SessionFixture) PullUpdates(tb testing.TB) *SessionFixture

func (*SessionFixture) PushUpdates

func (f *SessionFixture) PushUpdates(tb testing.TB) *SessionFixture

Jump to

Keyboard shortcuts

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