Documentation
¶
Index ¶
- Constants
- Variables
- func DecodePHC(phc string) (p *hashParams, s, h []byte, err error)
- func GeneratePHC(password string) (phc string, err error)
- func GenerateSalt(s uint32) (b []byte, err error)
- func ParseNewsletter(newsletter interface{}) (err error)
- func ValidatePHC(password string, phc string) (err error)
- type Body
- type Credentials
- type Newsletter
- type Subscriber
- type SubscriberEmail
- type SubscriberName
Constants ¶
View Source
const InvalidRunes = "{}/\\<>() "
Variables ¶
View Source
var BaseHash string
Functions ¶
func GeneratePHC ¶
func GenerateSalt ¶
func ParseNewsletter ¶
func ParseNewsletter(newsletter interface{}) (err error)
func ValidatePHC ¶
Types ¶
type Credentials ¶
type Newsletter ¶
type Newsletter struct { Recipient SubscriberEmail Content *Body }
type Subscriber ¶
type Subscriber struct { ID string `json:"id"` Email SubscriberEmail `json:"email" binding:"required"` Name SubscriberName `json:"name" binding:"required"` Status string `json:"status"` }
type SubscriberEmail ¶
type SubscriberEmail string
func ParseEmail ¶
func ParseEmail(email string) (subscriber SubscriberEmail, err error)
func (SubscriberEmail) MarshalJSON ¶
func (email SubscriberEmail) MarshalJSON() ([]byte, error)
func (SubscriberEmail) String ¶
func (email SubscriberEmail) String() string
func (*SubscriberEmail) UnmarshalJSON ¶
func (email *SubscriberEmail) UnmarshalJSON(data []byte) (err error)
type SubscriberName ¶
type SubscriberName string
func ParseName ¶
func ParseName(name string) (subscriber SubscriberName, err error)
func (SubscriberName) MarshalJSON ¶
func (name SubscriberName) MarshalJSON() ([]byte, error)
func (SubscriberName) String ¶
func (name SubscriberName) String() string
func (*SubscriberName) UnmarshalJSON ¶
func (name *SubscriberName) UnmarshalJSON(data []byte) (err error)
Click to show internal directories.
Click to hide internal directories.