Documentation ¶
Index ¶
- type Store
- type StoreDatabase
- func (m *StoreDatabase) BanUser(ctxCtx context.Context, fromChat, fromEnqueuing, fromRewards bool, ...) (string, error)
- func (m *StoreDatabase) LoadPaymentAddressBannedFromRewards(ctx context.Context, address string) (bool, error)
- func (m *StoreDatabase) LoadPaymentAddressBannedFromVideoEnqueuing(ctx context.Context, address string) (bool, error)
- func (m *StoreDatabase) LoadPaymentAddressHasReducedHardChallengeFrequency(ctx context.Context, address string) (bool, error)
- func (m *StoreDatabase) LoadPaymentAddressSkipsClientIntegrityChecks(ctx context.Context, address string) (bool, error)
- func (m *StoreDatabase) LoadPaymentAddressSkipsIPReputationChecks(ctx context.Context, address string) (bool, error)
- func (m *StoreDatabase) LoadRemoteAddressBannedFromRewards(ctx context.Context, remoteAddress string) (bool, error)
- func (m *StoreDatabase) LoadRemoteAddressBannedFromVideoEnqueuing(ctx context.Context, remoteAddress string) (bool, error)
- func (m *StoreDatabase) LoadUserBannedFromChat(ctx context.Context, address, remoteAddress string) (bool, error)
- func (m *StoreDatabase) RemoveBan(ctxCtx context.Context, banID, reason string, moderator auth.User) error
- func (m *StoreDatabase) RemoveVerification(ctxCtx context.Context, verificationID, reason string, moderator auth.User) error
- func (m *StoreDatabase) VerifyUser(ctxCtx context.Context, ...) (string, error)
- type StoreNoOp
- func (*StoreNoOp) BanUser(ctx context.Context, fromChat, fromEnqueuing, fromRewards bool, ...) (string, error)
- func (*StoreNoOp) LoadPaymentAddressBannedFromRewards(ctx context.Context, address string) (bool, error)
- func (*StoreNoOp) LoadPaymentAddressBannedFromVideoEnqueuing(ctx context.Context, address string) (bool, error)
- func (*StoreNoOp) LoadPaymentAddressHasReducedHardChallengeFrequency(ctx context.Context, address string) (bool, error)
- func (*StoreNoOp) LoadPaymentAddressSkipsClientIntegrityChecks(ctx context.Context, address string) (bool, error)
- func (*StoreNoOp) LoadPaymentAddressSkipsIPReputationChecks(ctx context.Context, address string) (bool, error)
- func (*StoreNoOp) LoadRemoteAddressBannedFromRewards(ctx context.Context, remoteAddress string) (bool, error)
- func (*StoreNoOp) LoadRemoteAddressBannedFromVideoEnqueuing(ctx context.Context, remoteAddress string) (bool, error)
- func (*StoreNoOp) LoadUserBannedFromChat(ctx context.Context, address, remoteAddress string) (bool, error)
- func (*StoreNoOp) RemoveBan(ctx context.Context, banID, reason string, moderator auth.User) error
- func (*StoreNoOp) RemoveVerification(ctx context.Context, verificationID, reason string, moderator auth.User) error
- func (*StoreNoOp) VerifyUser(ctx context.Context, ...) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store interface { LoadUserBannedFromChat(ctx context.Context, address, remoteAddress string) (bool, error) LoadRemoteAddressBannedFromVideoEnqueuing(ctx context.Context, remoteAddress string) (bool, error) LoadPaymentAddressBannedFromVideoEnqueuing(ctx context.Context, address string) (bool, error) LoadRemoteAddressBannedFromRewards(ctx context.Context, remoteAddress string) (bool, error) LoadPaymentAddressBannedFromRewards(ctx context.Context, address string) (bool, error) BanUser(ctx context.Context, fromChat, fromEnqueuing, fromRewards bool, until *time.Time, address, remoteAddress, reason string, moderator auth.User, moderatorUsername string) (string, error) RemoveBan(ctx context.Context, banID, reason string, moderator auth.User) error LoadPaymentAddressSkipsClientIntegrityChecks(ctx context.Context, address string) (bool, error) LoadPaymentAddressSkipsIPReputationChecks(ctx context.Context, address string) (bool, error) LoadPaymentAddressHasReducedHardChallengeFrequency(ctx context.Context, address string) (bool, error) VerifyUser(ctx context.Context, skipClientIntegrityChecks, skipIPAddressReputationChecks, reduceHardChallengeFrequency bool, address, reason string, moderator auth.User, moderatorUsername string) (string, error) RemoveVerification(ctx context.Context, verificationID, reason string, moderator auth.User) error }
Store saves and loads moderation decisions
type StoreDatabase ¶
type StoreDatabase struct {
// contains filtered or unexported fields
}
StoreDatabase stores moderation decisions in the database
func (*StoreDatabase) LoadPaymentAddressBannedFromRewards ¶
func (*StoreDatabase) LoadPaymentAddressBannedFromVideoEnqueuing ¶
func (*StoreDatabase) LoadPaymentAddressHasReducedHardChallengeFrequency ¶
func (*StoreDatabase) LoadPaymentAddressSkipsClientIntegrityChecks ¶
func (*StoreDatabase) LoadPaymentAddressSkipsIPReputationChecks ¶
func (*StoreDatabase) LoadRemoteAddressBannedFromRewards ¶
func (*StoreDatabase) LoadRemoteAddressBannedFromVideoEnqueuing ¶
func (*StoreDatabase) LoadUserBannedFromChat ¶
func (*StoreDatabase) RemoveVerification ¶
type StoreNoOp ¶
type StoreNoOp struct{}
StoreNoOp does not actually store any decisions, nobody is banned
func (*StoreNoOp) LoadPaymentAddressBannedFromRewards ¶
func (*StoreNoOp) LoadPaymentAddressBannedFromVideoEnqueuing ¶
func (*StoreNoOp) LoadPaymentAddressHasReducedHardChallengeFrequency ¶
func (*StoreNoOp) LoadPaymentAddressSkipsClientIntegrityChecks ¶
func (*StoreNoOp) LoadPaymentAddressSkipsIPReputationChecks ¶
func (*StoreNoOp) LoadRemoteAddressBannedFromRewards ¶
func (*StoreNoOp) LoadRemoteAddressBannedFromVideoEnqueuing ¶
func (*StoreNoOp) LoadUserBannedFromChat ¶
func (*StoreNoOp) RemoveVerification ¶
Click to show internal directories.
Click to hide internal directories.