Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidSeparator = errors.New("gosrs: Invalid SRS separator. Must be one of '=', '+', '-'. Default '='") ErrInvalidSRSAddress = errors.New("gosrs: Not an SRS address") ErrInvalidHash = errors.New("gosrs: Invalid hash") ErrInvalidTimestampCharacter = errors.New("gosrs: Invalid timestamp character") ErrTimestampExpired = errors.New("gosrs: Timestamp expired") ErrInvalidAddress = errors.New("gosrs: Invalid email address") )
Functions ¶
This section is empty.
Types ¶
type GS ¶
type GS struct {
// contains filtered or unexported fields
}
GS - Guarded Scheme Config struct
func GuardedScheme ¶
GuardedScheme initializes the library
func (*GS) Forward ¶
Forward - Rewrites sender 'from' address to 'alias' domain. As described in the SRS specification, the algorithm is:
- If 'from' is an SRS1 address rewritten by 1stHop.com to SRS0 and later by nthHop.com to SRS1, rewrite to a new SRS1 address such that bounces will go to us then 1stHop.com.
- If 'from' is an SRS0 address rewritten by 1stHop.com, rewrite to an SRS1 address such that bounces will go to us then back to 1stHop.com.
- If 'from' is neither an SRS0 address nor an SRS1 address, rewrite to an SRS0 address such that bounces will go to us then back to 'from'.
func (*GS) Reverse ¶
Reverse reverses a rewritten address. As described in the SRS specification, the algorithm is:
- If 'addr' is an SRS0 address rewritten by us, bounce to the original envelope sender address.
- If 'addr' is an SRS1 address rewritten by 1stHop.com and then us, bounce to the SRS0 address rewritten by 1stHop.com.
func (*GS) SetHashlen ¶
SetHashlen sets the length of the GS hash part
func (*GS) SetSeparator ¶
SetSeparator Sets the GS address separator to 'separator'. Must be one of '=', '+', or '-'
func (*GS) SetValidity ¶
SetValidity sets the number of days GS timstamp is valid for
Click to show internal directories.
Click to hide internal directories.