inmemorydb

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create() dbrepo.Repository

Types

type InMemoryRepository

type InMemoryRepository struct {
	Now func() time.Time
	// contains filtered or unexported fields
}

func (*InMemoryRepository) AddAttendee

func (r *InMemoryRepository) AddAttendee(ctx context.Context, a *entity.Attendee) (uint, error)

func (*InMemoryRepository) AddBan

func (r *InMemoryRepository) AddBan(ctx context.Context, b *entity.Ban) (uint, error)

func (*InMemoryRepository) AddStatusChange

func (r *InMemoryRepository) AddStatusChange(ctx context.Context, sc *entity.StatusChange) error

func (*InMemoryRepository) Close

func (r *InMemoryRepository) Close()

func (*InMemoryRepository) CountAttendeesByIdentity

func (r *InMemoryRepository) CountAttendeesByIdentity(ctx context.Context, identity string) (int64, error)

func (*InMemoryRepository) CountAttendeesByNicknameZipEmail

func (r *InMemoryRepository) CountAttendeesByNicknameZipEmail(ctx context.Context, nickname string, zip string, email string) (int64, error)

func (*InMemoryRepository) DeleteBan

func (r *InMemoryRepository) DeleteBan(ctx context.Context, b *entity.Ban) error

func (*InMemoryRepository) FindAttendees

func (*InMemoryRepository) FindByIdentity

func (r *InMemoryRepository) FindByIdentity(ctx context.Context, identity string) ([]*entity.Attendee, error)

func (*InMemoryRepository) GetAdditionalInfoFor

func (r *InMemoryRepository) GetAdditionalInfoFor(ctx context.Context, attendeeId uint, area string) (*entity.AdditionalInfo, error)

func (*InMemoryRepository) GetAdminInfoByAttendeeId

func (r *InMemoryRepository) GetAdminInfoByAttendeeId(ctx context.Context, attendeeId uint) (*entity.AdminInfo, error)

func (*InMemoryRepository) GetAllAdditionalInfoOrEmptyMap

func (r *InMemoryRepository) GetAllAdditionalInfoOrEmptyMap(ctx context.Context, attendeeId uint) map[string]*entity.AdditionalInfo

func (*InMemoryRepository) GetAllBans

func (r *InMemoryRepository) GetAllBans(ctx context.Context) ([]*entity.Ban, error)

func (*InMemoryRepository) GetAttendeeById

func (r *InMemoryRepository) GetAttendeeById(ctx context.Context, id uint) (*entity.Attendee, error)

func (*InMemoryRepository) GetBanById

func (r *InMemoryRepository) GetBanById(ctx context.Context, id uint) (*entity.Ban, error)

func (*InMemoryRepository) GetHistoryById

func (r *InMemoryRepository) GetHistoryById(ctx context.Context, id uint) (*entity.History, error)

only offered for testing, and only on the in memory db

func (*InMemoryRepository) GetLatestStatusChangeByAttendeeId

func (r *InMemoryRepository) GetLatestStatusChangeByAttendeeId(ctx context.Context, attendeeId uint) (*entity.StatusChange, error)

func (*InMemoryRepository) GetStatusChangesByAttendeeId

func (r *InMemoryRepository) GetStatusChangesByAttendeeId(ctx context.Context, attendeeId uint) ([]entity.StatusChange, error)

func (*InMemoryRepository) MaxAttendeeId

func (r *InMemoryRepository) MaxAttendeeId(ctx context.Context) (uint, error)

func (*InMemoryRepository) Migrate

func (r *InMemoryRepository) Migrate() error

func (*InMemoryRepository) Open

func (r *InMemoryRepository) Open() error

func (*InMemoryRepository) RecordHistory

func (r *InMemoryRepository) RecordHistory(ctx context.Context, h *entity.History) error

func (*InMemoryRepository) SoftDeleteAttendeeById

func (r *InMemoryRepository) SoftDeleteAttendeeById(ctx context.Context, id uint) error

func (*InMemoryRepository) UndeleteAttendeeById

func (r *InMemoryRepository) UndeleteAttendeeById(ctx context.Context, id uint) error

func (*InMemoryRepository) UpdateAttendee

func (r *InMemoryRepository) UpdateAttendee(ctx context.Context, a *entity.Attendee) error

func (*InMemoryRepository) UpdateBan

func (r *InMemoryRepository) UpdateBan(ctx context.Context, b *entity.Ban) error

func (*InMemoryRepository) WriteAdditionalInfo

func (r *InMemoryRepository) WriteAdditionalInfo(ctx context.Context, ad *entity.AdditionalInfo) error

func (*InMemoryRepository) WriteAdminInfo

func (r *InMemoryRepository) WriteAdminInfo(ctx context.Context, ai *entity.AdminInfo) error

Jump to

Keyboard shortcuts

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