sharecode

package
v0.1358.0-weblatepr.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data added in v0.1338.0

type Data struct {
	PK                    dynamo.ShareKeyType
	SK                    dynamo.ShareSortKeyType
	UpdatedAt             time.Time
	LpaKey                dynamo.LpaKeyType
	LpaOwnerKey           dynamo.LpaOwnerKeyType
	ActorUID              actoruid.UID
	IsReplacementAttorney bool
	IsTrustCorporation    bool

	// InviteSentTo is the email address the supporter sent the invite to
	InviteSentTo string
	// LpaLinkedAt is the time the donor entered the access code
	LpaLinkedAt time.Time
	// LpaLinkedTo is set to the email address the donor used to sign-in when
	// using the code
	LpaLinkedTo string
}

type DynamoClient added in v0.1343.0

type DynamoClient interface {
	One(ctx context.Context, pk dynamo.PK, sk dynamo.SK, v interface{}) error
	OneByPK(ctx context.Context, pk dynamo.PK, v interface{}) error
	OneBySK(ctx context.Context, sk dynamo.SK, v interface{}) error
	Put(ctx context.Context, v interface{}) error
	DeleteOne(ctx context.Context, pk dynamo.PK, sk dynamo.SK) error
}

type Store added in v0.1343.0

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

func NewStore added in v0.1343.0

func NewStore(dynamoClient DynamoClient) *Store

func (*Store) Delete added in v0.1343.0

func (s *Store) Delete(ctx context.Context, shareCode Data) error

func (*Store) Get added in v0.1343.0

func (s *Store) Get(ctx context.Context, actorType actor.Type, shareCode string) (Data, error)

func (*Store) GetDonor added in v0.1343.0

func (s *Store) GetDonor(ctx context.Context) (Data, error)

func (*Store) Put added in v0.1343.0

func (s *Store) Put(ctx context.Context, actorType actor.Type, shareCode string, data Data) error

func (*Store) PutDonor added in v0.1343.0

func (s *Store) PutDonor(ctx context.Context, shareCode string, data Data) error

Jump to

Keyboard shortcuts

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