memory

package
v1.13.28 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInMemory

func NewInMemory() pool.Store

Types

type InMemoryStore

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

func (*InMemoryStore) ClosePool added in v1.8.3

func (s *InMemoryStore) ClosePool(_ context.Context, poolID *poolpb.PoolId, closedAt time.Time, newSignature *commonpb.Signature) error

func (*InMemoryStore) CreateBet

func (s *InMemoryStore) CreateBet(_ context.Context, newBet *pool.Bet) error

func (*InMemoryStore) CreatePool

func (s *InMemoryStore) CreatePool(_ context.Context, newPool *pool.Pool) error

func (*InMemoryStore) GetBetByID added in v1.8.11

func (s *InMemoryStore) GetBetByID(_ context.Context, betID *poolpb.BetId) (*pool.Bet, error)

func (*InMemoryStore) GetBetByUser

func (s *InMemoryStore) GetBetByUser(_ context.Context, poolID *poolpb.PoolId, userID *commonpb.UserId) (*pool.Bet, error)

func (*InMemoryStore) GetBetsByPool

func (s *InMemoryStore) GetBetsByPool(_ context.Context, poolID *poolpb.PoolId) ([]*pool.Bet, error)

func (*InMemoryStore) GetMember added in v1.9.5

func (s *InMemoryStore) GetMember(_ context.Context, poolID *poolpb.PoolId, userID *commonpb.UserId) (*pool.Member, error)

func (*InMemoryStore) GetPagedMembers added in v1.8.1

func (s *InMemoryStore) GetPagedMembers(_ context.Context, userID *commonpb.UserId, queryOptions ...database.QueryOption) ([]*pool.Member, error)

func (*InMemoryStore) GetPoolByFundingDestination added in v1.8.11

func (s *InMemoryStore) GetPoolByFundingDestination(_ context.Context, fundingDestination *commonpb.PublicKey) (*pool.Pool, error)

func (*InMemoryStore) GetPoolByID

func (s *InMemoryStore) GetPoolByID(_ context.Context, poolID *poolpb.PoolId) (*pool.Pool, error)

func (*InMemoryStore) MarkBetAsPaid added in v1.8.11

func (s *InMemoryStore) MarkBetAsPaid(ctx context.Context, betId *poolpb.BetId) error

func (*InMemoryStore) ResolvePool

func (s *InMemoryStore) ResolvePool(_ context.Context, poolID *poolpb.PoolId, resolution pool.Resolution, newSignature *commonpb.Signature) error

func (*InMemoryStore) UpdateBetOutcome added in v1.8.7

func (s *InMemoryStore) UpdateBetOutcome(_ context.Context, betId *poolpb.BetId, newOutcome bool, newSignature *commonpb.Signature, newTs time.Time) error

type MembersById added in v1.8.1

type MembersById []*pool.Member

func (MembersById) Len added in v1.8.1

func (a MembersById) Len() int

func (MembersById) Less added in v1.8.1

func (a MembersById) Less(i, j int) bool

func (MembersById) Swap added in v1.8.1

func (a MembersById) Swap(i, j int)

Jump to

Keyboard shortcuts

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