Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidLinkToken = errors.New("link token invalid")
)
Functions ¶
This section is empty.
Types ¶
type ActivationTokenData ¶
type ActivationTokenData struct {
ActivateUser int `json:"activateUser"`
}
func (*ActivationTokenData) MarshalJSON ¶
func (d *ActivationTokenData) MarshalJSON() ([]byte, error)
func (*ActivationTokenData) UnmarshalJSON ¶
func (d *ActivationTokenData) UnmarshalJSON(data []byte) error
type EmailActivationTokenData ¶
type EmailActivationTokenData struct {
ActivateEmail string `json:"activate_email"`
}
func (*EmailActivationTokenData) MarshalJSON ¶
func (d *EmailActivationTokenData) MarshalJSON() ([]byte, error)
func (*EmailActivationTokenData) UnmarshalJSON ¶
func (d *EmailActivationTokenData) UnmarshalJSON(data []byte) error
type LinkToken ¶
func NewLinkToken ¶
type RequestTokenData ¶
type RequestTokenData struct {
Request int `json:"request"`
}
func (*RequestTokenData) MarshalJSON ¶
func (d *RequestTokenData) MarshalJSON() ([]byte, error)
func (*RequestTokenData) UnmarshalJSON ¶
func (d *RequestTokenData) UnmarshalJSON(data []byte) error
type TokenCodec ¶
type TokenCodec struct {
// contains filtered or unexported fields
}
func NewTokenCodec ¶
func NewTokenCodec(keyVersion int, key string) *TokenCodec
func (*TokenCodec) DecodeToken ¶
func (c *TokenCodec) DecodeToken(tokenString string, tokenData TokenData) (*LinkToken, error)
func (*TokenCodec) EncodeToken ¶
func (c *TokenCodec) EncodeToken(token *LinkToken) (string, error)
type UserTokenData ¶
type UserTokenData struct {
User int `json:"user"`
}
func (*UserTokenData) MarshalJSON ¶
func (d *UserTokenData) MarshalJSON() ([]byte, error)
func (*UserTokenData) UnmarshalJSON ¶
func (d *UserTokenData) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.