Documentation ¶
Index ¶
- func BreachPartitionKey(breachName string) string
- func BreachSortKey(breachName string) string
- func IsValidEmail(email string) bool
- type Account
- type AccountItem
- type Breach
- type BreachItem
- type DBItem
- type EmailAccount
- type Itemable
- type MessageQueue
- type Repo
- type SendMessageInput
- type Subscriber
- type SubscriberItem
- type Username
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BreachPartitionKey ¶
func BreachSortKey ¶
func IsValidEmail ¶
Types ¶
type AccountItem ¶
func (AccountItem) GetUsername ¶
func (a AccountItem) GetUsername() (Username, error)
func (AccountItem) ToAccount ¶
func (a AccountItem) ToAccount() (Account, error)
type Breach ¶
type Breach struct { BreachName string Title string Domain string Description string BreachDate time.Time BreachedAccounts []string }
/ Breach represents the breach domain model.
func (Breach) AddAccounts ¶
func (Breach) Item ¶
func (b Breach) Item() BreachItem
func (Breach) PartitionKey ¶
type BreachItem ¶
type BreachItem struct { PK string SK string Type string BreachName string Title string Domain string Description string BreachDate time.Time BreachedAccounts []string }
/ BreachItem represents the schema stored in the database.
func (BreachItem) ToBreach ¶
func (b BreachItem) ToBreach() Breach
type EmailAccount ¶
func NewEmailAccount ¶
func NewEmailAccount(emailStr string) (EmailAccount, error)
func (EmailAccount) PartitionKey ¶
func (e EmailAccount) PartitionKey() string
func (EmailAccount) SortKey ¶
func (e EmailAccount) SortKey() string
func (EmailAccount) String ¶
func (e EmailAccount) String() string
type MessageQueue ¶
type MessageQueue struct {
// contains filtered or unexported fields
}
func NewMessageQueue ¶
func NewMessageQueue(queue *sqs.SQS) MessageQueue
func (MessageQueue) SendMessage ¶
func (m MessageQueue) SendMessage(input SendMessageInput) error
type SendMessageInput ¶
type Subscriber ¶
type Subscriber struct {
Email string
}
func NewSubscriber ¶
func NewSubscriber(email string) (Subscriber, error)
func (Subscriber) Item ¶
func (s Subscriber) Item() SubscriberItem
func (Subscriber) PartitionKey ¶
func (s Subscriber) PartitionKey() string
func (Subscriber) SortKey ¶
func (s Subscriber) SortKey() string
func (Subscriber) ToItem ¶
func (s Subscriber) ToItem() DBItem
type SubscriberItem ¶
func (SubscriberItem) ToSubscriber ¶
func (s SubscriberItem) ToSubscriber() Subscriber
Click to show internal directories.
Click to hide internal directories.