Documentation
¶
Index ¶
- Constants
- Variables
- type Codec
- func (c *Codec) DecodeBodyOnly(s string) (uint64, error)
- func (c *Codec) DecodeToUint64(s string) (uint64, error)
- func (c *Codec) DecodeToUint64WithKind(s string, kind *byte) (uint64, error)
- func (c *Codec) EncodeUint64(id uint64) string
- func (c *Codec) EncodeUint64WithKind(id uint64, kind *byte) string
- func (c *Codec) MustDecodeToUint64(s string) uint64
- func (c *Codec) MustEncodeUint64(id uint64) string
- func (c *Codec) Validate(s string) error
- type Config
- type MultiCodec
Constants ¶
View Source
const DefaultAlphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
Variables ¶
View Source
var ( ErrInvalidLength = errors.New("idcodec: invalid length") ErrVersionMismatch = errors.New("idcodec: version mismatch") ErrMACVerification = errors.New("idcodec: MAC verification failed") ErrInvalidBase62Char = errors.New("idcodec: invalid base62 character") ErrBadConfig = errors.New("idcodec: bad config") )
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec struct {
// contains filtered or unexported fields
}
func MustNewCodecFromSecret ¶
func NewCodecFromSecret ¶
func (*Codec) DecodeToUint64WithKind ¶
func (*Codec) EncodeUint64 ¶
func (*Codec) EncodeUint64WithKind ¶
func (*Codec) MustDecodeToUint64 ¶
func (*Codec) MustEncodeUint64 ¶
type MultiCodec ¶
func (MultiCodec) DecodeToUint64 ¶
func (m MultiCodec) DecodeToUint64(s string) (uint64, error)
func (MultiCodec) EncodeUint64 ¶
func (m MultiCodec) EncodeUint64(id uint64) string
Click to show internal directories.
Click to hide internal directories.