Documentation ¶
Index ¶
- func DecodeGetId(publicKey string, tokenstring string) string
- func Encode(id string, privateKey string) (string, error)
- func EncodeWithStruct[T any](id string, data *T, privateKey string) (string, error)
- func EncodeWithStructDuration[T any](id string, data *T, privateKey string, dur ...time.Duration) (string, error)
- func EncodeforHours(id string, privateKey string, hours int32) (string, error)
- func EncodeforMinutes(id string, privateKey string, minutes int32) (string, error)
- func EncodeforSeconds(id string, privateKey string, seconds int32) (string, error)
- func GenerateKey() (privateKey, publicKey string)
- type PASETO
- func (p PASETO) Decode(tokenString string, payload any) (err error)
- func (p PASETO) DecodeGetId(tokenString string) string
- func (p PASETO) Encode(id string) (string, error)
- func (p PASETO) EncodeWithStruct(id string, data any) (string, error)
- func (p PASETO) EncodeWithStructDuration(id string, data any, dur ...time.Duration) (string, error)
- func (p PASETO) RawDecode(tokenString string) (raw []byte, err error)
- type Payload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeGetId ¶
func EncodeWithStruct ¶
func EncodeforHours ¶
func EncodeforMinutes ¶
func EncodeforSeconds ¶
func GenerateKey ¶
func GenerateKey() (privateKey, publicKey string)
Types ¶
type PASETO ¶
func (PASETO) DecodeGetId ¶
func (PASETO) EncodeWithStruct ¶
func (PASETO) EncodeWithStructDuration ¶
Click to show internal directories.
Click to hide internal directories.