blockeduser

package
v0.0.0-...-732ec5d Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store interface {
	LoadUsersBlockedBy(context.Context, auth.User) ([]string, error)
	BlockUser(ctx context.Context, userToBlock, blockedBy auth.User) error
	UnblockUser(ctx context.Context, blockID string, blockedBy auth.User) (auth.User, error)
	UnblockUserByAddress(ctx context.Context, address string, blockedBy auth.User) (auth.User, error)
}

type StoreDatabase

type StoreDatabase struct{}

StoreDatabase stores blocked users in the database

func NewStoreDatabase

func NewStoreDatabase() *StoreDatabase

NewStoreDatabase initializes and returns a new StoreDatabase

func (*StoreDatabase) BlockUser

func (s *StoreDatabase) BlockUser(ctxCtx context.Context, userToBlock, blockedBy auth.User) error

func (*StoreDatabase) LoadUsersBlockedBy

func (s *StoreDatabase) LoadUsersBlockedBy(ctxCtx context.Context, user auth.User) ([]string, error)

func (*StoreDatabase) UnblockUser

func (s *StoreDatabase) UnblockUser(ctxCtx context.Context, blockID string, blockedBy auth.User) (auth.User, error)

func (*StoreDatabase) UnblockUserByAddress

func (s *StoreDatabase) UnblockUserByAddress(ctxCtx context.Context, address string, blockedBy auth.User) (auth.User, error)

Jump to

Keyboard shortcuts

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